mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-08 11:19:16 +02: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)
|
v = self.values.get(key, None)
|
||||||
if v is None:
|
if v is None:
|
||||||
if default is None:
|
if default is None:
|
||||||
if self.filename:
|
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, self.filename, ekey))
|
raise Exception('config: Missing configuration value \'%s\': set it in the config file \'%s\' or set the environment variable \'%s\'' % (key, f, ekey))
|
||||||
else:
|
|
||||||
raise Exception('config: Missing configuration value \'%s\': set it in the config file or set the environment variable \'%s\'' % (key, ekey))
|
|
||||||
self.v[key] = v
|
self.v[key] = v
|
||||||
return v if v is not None else default
|
return v if v is not None else default
|
||||||
config = ConfigStore()
|
config = ConfigStore()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue