Skip to content

Commit

Permalink
Change output of None to conform to Windows console foibles.
Browse files Browse the repository at this point in the history
  • Loading branch information
zaneselvans committed Sep 12, 2019
1 parent 7b6d073 commit 65a81af
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/pudl/workspace/datastore_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ def parse_command_line(argv):
"""
parser = argparse.ArgumentParser(description=__doc__)

# This is necessary because on the Windows console "None" doesn't end up
# getting encoded correctly to print at the console. Somehow.
default_pudl_in = pudl.workspace.setup.get_defaults()["pudl_in"]
if default_pudl_in is None:
default_pudl_in = "None"

parser.add_argument(
'-q',
'--quiet',
Expand Down Expand Up @@ -55,7 +61,7 @@ def parse_command_line(argv):
type=str,
help="""Directory where the datastore should be located. (default:
%(default)s).""",
default=pudl.workspace.setup.get_defaults()["pudl_in"]
default=default_pudl_in,
)
parser.add_argument(
'-s',
Expand Down

0 comments on commit 65a81af

Please sign in to comment.