Skip to content

Commit

Permalink
gitlab-runner: ignore empty config
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamilcuk committed Oct 6, 2023
1 parent 6a659d1 commit 095c46e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nomad_tools/nomad_gitlab_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ def cli(verbose: int, configpath: Path, runner_id: int):
# Read configuration
configcontent = configpath.read_text()
data = yaml.safe_load(configcontent)
configs = {key: val for key, val in data.items()}
configs = {key: val for key, val in (data or {}).items()}
global config
config = Config(
{**configs.get("default", {}), **configs.get(runner_id, {})}
Expand Down

0 comments on commit 095c46e

Please sign in to comment.