Fixed silent keyword arg to config.from_envvar.
The ``silent`` keyword argument to Config.from_envvar was not being honored if the environment variable existed but the file that it mentioned did not. The fix was simple - pass the keyword argument on to the underlying call to ``from_pyfile``. I also noticed that the return value from ``from_pyfile`` was not being passed back so I fixed that as well.
This commit is contained in:
parent
20a3281209
commit
76773e1d0a
2 changed files with 19 additions and 2 deletions
|
|
@ -106,8 +106,7 @@ class Config(dict):
|
|||
'loaded. Set this variable and make it '
|
||||
'point to a configuration file' %
|
||||
variable_name)
|
||||
self.from_pyfile(rv)
|
||||
return True
|
||||
return self.from_pyfile(rv, silent=silent)
|
||||
|
||||
def from_pyfile(self, filename, silent=False):
|
||||
"""Updates the values in the config from a Python file. This function
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue