Skip to content

Commit

Permalink
fix: return early, passing tests when no config file is there
Browse files Browse the repository at this point in the history
  • Loading branch information
KernAttila committed Mar 28, 2023
1 parent edc1fcc commit 993666a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cuesubmit/cuesubmit/Config.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@

def getConfigValues():
"""Reads the config file from disk and returns the values it defines."""
configFile = os.environ.get(CONFIG_FILE_ENV_VAR)
configFile = os.environ.get(CONFIG_FILE_ENV_VAR)\
or os.path.join(opencue.config.config_base_directory(),
'cuesubmit.yaml')
if not configFile:
configFile = os.path.join(opencue.config.config_base_directory(), 'cuesubmit.yaml')
return {}
configData = _loadYamlFile(yaml_file=configFile)
if 'RENDER_CMDS' in configData:
configData['RENDER_CMDS'] = _expandRenderConfigValues(configData['RENDER_CMDS'])
Expand Down

0 comments on commit 993666a

Please sign in to comment.