Skip to content

Commit

Permalink
Merge branch 'fix-missing-example-uploads' into 'develop'
Browse files Browse the repository at this point in the history
Fixed issue with wrong example_uploads.yaml path.

See merge request nomad-lab/nomad-FAIR!1883
  • Loading branch information
markus1978 committed May 30, 2024
2 parents c3ebcfd + cf82f7d commit 4929816
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions nomad/cli/dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,13 +263,19 @@ def gui_config():
def _generate_example_upload_metadata():
import yaml

with open(
os.path.join(
example_uploads_path = 'examples/data/uploads/example_uploads.yml'

if not os.path.exists(example_uploads_path):
example_uploads_path = os.path.join(
os.path.dirname(__file__),
'../../',
'examples/data/uploads/example_uploads.yml',
)
) as infile:

if not os.path.exists(example_uploads_path):
raise FileNotFoundError('Cannot find example_uploads.yml file')

with open(example_uploads_path, 'r') as infile:
return yaml.load(infile, Loader=yaml.SafeLoader)


Expand Down

0 comments on commit 4929816

Please sign in to comment.