Commit 48ef121e authored by M. Huang's avatar M. Huang
Browse files

warning only for not having local conf

parent 785b3047
......@@ -78,7 +78,7 @@ def getConfig(name=None, conf='pns'):
# modul = __import__(module_name, globals(), locals(), [var_name], 0)
config.update(getattr(module, var_name))
logger.debug('Reading %s/%s done.' % (confp, file_name))
except ModuleNotFoundError as e:
except (ModuleNotFoundError, FileNotFoundError) as e:
e) + '. Use default config in the package, such as fdi/pns/ Copy it to ~/.config/[package] and make persistent customization there.')
......@@ -345,5 +345,4 @@ def test_getConfig_conf(getConfig):
os.environ['CONF_DIR'] = cp
check_conf(cp, typ, getConfig)
# non-existing. the file has been deleted by the check_conf in the last line
with pytest.raises(FileNotFoundError):
w = getConfig(conf=typ)
w = getConfig(conf=typ)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment