2.1.1 hotfix (#76)

* 2.1.1 hotfix
* debug log options that have nothing defined.
* make sure there is at least one value in the dictionary before considering it important.
* only attempt to create outputpath if it is defined.

* whoops
This commit is contained in:
CaitSith2 2020-04-25 17:57:20 -07:00 committed by GitHub
parent c5fbaeb51c
commit f380542bab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View File

@ -176,15 +176,21 @@ def main():
if len(set(player_settings.values())) > 1:
important[option] = {player: value for player, value in player_settings.items() if
player <= args.yaml_output}
else:
elif len(set(player_settings.values())) > 0:
important[option] = player_settings[1]
else:
logging.debug(f"No player settings defined for option '{option}'")
else:
if player_settings != "": # is not empty name
important[option] = player_settings
os.makedirs(args.outputpath, exist_ok=True)
else:
logging.debug(f"No player settings defined for option '{option}'")
if args.outputpath:
os.makedirs(args.outputpath, exist_ok=True)
with open(os.path.join(args.outputpath if args.outputpath else ".", f"mystery_result_{seed}.yaml"), "wt") as f:
yaml.dump(important, f)
logging.info(erargs)
ERmain(erargs, seed)

View File

@ -1,6 +1,6 @@
from __future__ import annotations
__version__ = "2.1.0"
__version__ = "2.1.1"
_version_tuple = tuple(int(piece, 10) for piece in __version__.split("."))
import os