Don't create test path if it already exists

pull/19/head
Cees Bassa 2019-07-12 15:16:06 +02:00
parent 476d3386d4
commit a11d9aca1a
1 changed files with 3 additions and 1 deletions

View File

@ -236,6 +236,7 @@ if __name__ == '__main__':
# Get camera type
camera_type = cfg.get('Camera', 'camera_type')
print(camera_type)
# Current time
tnow = Time.now()
@ -248,7 +249,8 @@ if __name__ == '__main__':
path = os.path.join(cfg.get('Common', 'observations_path'), "acquire_test")
else:
path = os.path.join(cfg.get('Common', 'observations_path'), obsid)
os.makedirs(path)
if not os.path.exists(path):
os.makedirs(path)
# Setup logging
logging.basicConfig(filename=os.path.join(path, "acquire.log"),