mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-30 21:20:10 +01:00
contrib/bzutil: print default config file name on missing paramter
Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
parent
e49bd006d9
commit
49fbca646b
1 changed files with 2 additions and 4 deletions
|
|
@ -170,10 +170,8 @@ class ConfigStore:
|
|||
v = self.values.get(key, None)
|
||||
if v is None:
|
||||
if default is None:
|
||||
if self.filename:
|
||||
raise Exception('config: Missing configuration value \'%s\': set it in the config file \'%s\' or set the environment variable \'%s\'' % (key, self.filename, ekey))
|
||||
else:
|
||||
raise Exception('config: Missing configuration value \'%s\': set it in the config file or set the environment variable \'%s\'' % (key, ekey))
|
||||
f = self.filename if self.filename else ConfigStore.DEFAULT_FILE
|
||||
raise Exception('config: Missing configuration value \'%s\': set it in the config file \'%s\' or set the environment variable \'%s\'' % (key, f, ekey))
|
||||
self.v[key] = v
|
||||
return v if v is not None else default
|
||||
config = ConfigStore()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue