From 96ecbef0f3d89da9fb0a1b3016430e84cc09918d Mon Sep 17 00:00:00 2001 From: imedan Date: Tue, 3 Oct 2023 11:23:29 -0500 Subject: [PATCH] switch to os.getenv --- bin/validate_designs_batches.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/validate_designs_batches.py b/bin/validate_designs_batches.py index 93116b4..f6aed96 100644 --- a/bin/validate_designs_batches.py +++ b/bin/validate_designs_batches.py @@ -421,7 +421,7 @@ def valid_design_func(file, exp, obsTime, field_desmodes, files = [] cache_files = [] - cache_dir = os.popen('echo $ROBOSTRATEGY_DATA').read()[:-1] + '/allocations/eta-0-bs-cache/targets/' + cache_dir = os.getenv('ROBOSTRATEGY_DATA') + '/allocations/eta-0-bs-cache/targets/' allocate_file = sdss_path.full('rsAllocationFinal', plan=plan, observatory=observatory) @@ -455,7 +455,7 @@ def valid_design_func(file, exp, obsTime, field_desmodes, files = [] cache_files = [] - cache_dir = os.popen('echo $ROBOSTRATEGY_DATA').read()[:-1] + '/allocations/eta-0-bs-cache/targets/' + cache_dir = os.getenv('ROBOSTRATEGY_DATA') + '/allocations/eta-0-bs-cache/targets/' allocate_file = sdss_path.full('rsAllocationFinal', plan=plan, observatory=observatory)