Skip to content

Commit

Permalink
Fix bug where local config file was being created
Browse files Browse the repository at this point in the history
  • Loading branch information
langmm committed Mar 13, 2020
1 parent 4793373 commit 7ad9ca6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions yggdrasil/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,9 @@ def run_tsts(**kwargs): # pragma: no cover
old_env[k] = os.environ.get(k, None)
os.environ[k] = v
for k, v in new_config.items():
old_config[k] = config.ygg_cfg.get(k[0], k[1], None)
config.ygg_cfg.set(k[0], k[1], v)
config.ygg_cfg.update_file()
old_config[k] = config.ygg_cfg_usr.get(k[0], k[1], None)
config.ygg_cfg_usr.set(k[0], k[1], v)
config.ygg_cfg_usr.update_file()
# Perform CI specific pretest operations
if args.ci:
top_dir = os.path.dirname(os.getcwd())
Expand Down Expand Up @@ -355,10 +355,10 @@ def run_tsts(**kwargs): # pragma: no cover
os.environ[k] = v
for k, v in old_config.items():
if v is None:
config.ygg_cfg.pop(k[0], k[1])
config.ygg_cfg_usr.pop(k[0], k[1])
else:
config.ygg_cfg.set(k[0], k[1], v)
config.ygg_cfg.update_file()
config.ygg_cfg_usr.set(k[0], k[1], v)
config.ygg_cfg_usr.update_file()
if os.path.isfile(pth_file):
os.remove(pth_file)
return error_code
Expand Down

0 comments on commit 7ad9ca6

Please sign in to comment.