diff options
| author | Egor Tensin <Egor.Tensin@gmail.com> | 2020-03-30 11:56:05 +0300 |
|---|---|---|
| committer | Egor Tensin <Egor.Tensin@gmail.com> | 2020-03-30 12:03:37 +0300 |
| commit | 98e3a56296cb9955e49adb09a111f26e07328338 (patch) | |
| tree | bbbd6a464a809c00398bc12ef4cb472f92b30eab /project/utils.py | |
| parent | project.cmake: make it --boost aware (diff) | |
| download | cmake-common-98e3a56296cb9955e49adb09a111f26e07328338.tar.gz cmake-common-98e3a56296cb9955e49adb09a111f26e07328338.zip | |
project.ci: dedupe code
Diffstat (limited to 'project/utils.py')
| -rw-r--r-- | project/utils.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/project/utils.py b/project/utils.py index 68327af..5874eab 100644 --- a/project/utils.py +++ b/project/utils.py @@ -74,3 +74,9 @@ def temp_file(contents, **kwargs): file.write(contents) with delete(path): yield path + + +def env(name): + if name not in os.environ: + raise RuntimeError(f'undefined environment variable: {name}') + return os.environ[name] |
