summaryrefslogtreecommitdiff
path: root/jfr_playoff/settings.py
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2018-02-23 16:34:18 +0100
committeremkael <emkael@tlen.pl>2018-02-23 16:34:18 +0100
commite8a06741465702163977c638c5d11ff4419e7c75 (patch)
tree7a9a6fe12970e26ec0a7c3131d1c1b7e52da3361 /jfr_playoff/settings.py
parent4f83ab2780bbe79784ecfbe0530f7f4dda102f10 (diff)
Converting command line argument parsing to argparse
Diffstat (limited to 'jfr_playoff/settings.py')
-rw-r--r--jfr_playoff/settings.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/jfr_playoff/settings.py b/jfr_playoff/settings.py
index 9d727a7..021253f 100644
--- a/jfr_playoff/settings.py
+++ b/jfr_playoff/settings.py
@@ -11,12 +11,12 @@ def complete_filename(text, state):
class PlayoffSettings(object):
- def __init__(self):
+ def __init__(self, config_file):
self.settings = None
self.interactive = False
self.settings_file = None
- if len(sys.argv) > 1:
- self.settings_file = sys.argv[1].decode(
+ if config_file is not None:
+ self.settings_file = config_file.decode(
sys.getfilesystemencoding())
else:
self.interactive = True