Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

Commit

Permalink
SitConfing config dic initialization fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DanSava committed Jan 15, 2020
1 parent c9de14e commit ddfd865
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions python/res/enkf/site_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,22 +77,21 @@ def __init__(self, user_config_file=None, config_content=None, config_dict=None)
ext_job_list.add_job(job[ConfigKeys.NAME], new_job)
except:
print("WARNING: Unable to create job from {}".format(job[ConfigKeys.PATH]))
continue

for job_path in config_dict.get(ConfigKeys.INSTALL_JOB_DIRECTORY, []):
if not os.path.isdir(job_path):
print("WARNING: Unable to locate job directory {}".format(job[ConfigKeys.PATH]))
print("WARNING: Unable to locate job directory {}".format(job_path))
continue
files = os.listdir(job_path)
for file_name in files:
full_path = os.path.join(job_path, file_name)
try:
new_job = ExtJob(config_file=full_path, private=False, license_root_path=__license_root_path)
new_job.convertToCReference(None)
ext_job_list.add_job(new_job.name(), new_job)
except:
print("WARNING: Unable to create job from {}".format(full_path))
continue
if os.path.isfile(full_path):
try:
new_job = ExtJob(config_file=full_path, private=False, license_root_path=__license_root_path)
new_job.convertToCReference(None)
ext_job_list.add_job(new_job.name(), new_job)
except:
print("WARNING: Unable to create job from {}".format(full_path))

ext_job_list.convertToCReference(None)

Expand Down

0 comments on commit ddfd865

Please sign in to comment.