diff options
author | MichaĆ Zimniewicz <michzimny@users.noreply.github.com> | 2018-02-24 12:18:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-24 12:18:34 +0100 |
commit | 843ed80cb0153f0628e33ae2d5bc1c473d2555db (patch) | |
tree | 270ec784e8c0ec03d05625dac4049867ea3a3397 | |
parent | ae0cd41992476206b8eb50650b6a34d4f24c51ef (diff) | |
parent | 85f1189d9e499a21dcd7ed3e35f395a325f6e7ae (diff) |
Prompting for database name if not provided
-rwxr-xr-x | ql/settings.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ql/settings.py b/ql/settings.py index 7d8af00..57281f5 100755 --- a/ql/settings.py +++ b/ql/settings.py @@ -4,6 +4,8 @@ def _fetch_settings(config_path, constant_config, default_config): try:
config = constant_config.copy()
config.update(json.load(open(config_path)))
+ if 'NAME' not in config:
+ config['NAME'] = input('Please enter database name: ')
return config
except FileNotFoundError:
with open(config_path, 'w') as new_config:
|