lister.py: add conffile setting to en/disable JSON caching
This commit is contained in:
parent
7f706e4fa8
commit
d3e542ab7e
2 changed files with 10 additions and 3 deletions
11
bin/ghlister
11
bin/ghlister
|
@ -18,8 +18,9 @@ from ghlister.db_utils import session_scope
|
|||
|
||||
|
||||
DEFAULT_CONF = {
|
||||
'cache_dir': './cache',
|
||||
'log_dir': './log',
|
||||
'cache_dir': './cache',
|
||||
'log_dir': './log',
|
||||
'cache_json': 'False',
|
||||
}
|
||||
|
||||
|
||||
|
@ -93,6 +94,12 @@ def read_conf(args):
|
|||
if args.db_url:
|
||||
conf['db_url'] = args.db_url
|
||||
|
||||
# typing
|
||||
if 'cache_json' in conf and conf['cache_json'].lower() == 'true':
|
||||
conf['cache_json'] = True
|
||||
else:
|
||||
conf['cache_json'] = False
|
||||
|
||||
return conf
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue