summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichaƂ Zimniewicz <michzimny@users.noreply.github.com>2018-02-24 12:18:34 +0100
committerGitHub <noreply@github.com>2018-02-24 12:18:34 +0100
commit843ed80cb0153f0628e33ae2d5bc1c473d2555db (patch)
tree270ec784e8c0ec03d05625dac4049867ea3a3397
parentae0cd41992476206b8eb50650b6a34d4f24c51ef (diff)
parent85f1189d9e499a21dcd7ed3e35f395a325f6e7ae (diff)
Merge pull request #20 from michzimny/database-name-promptHEADmaster
Prompting for database name if not provided
-rwxr-xr-xql/settings.py2
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: