-
Notifications
You must be signed in to change notification settings - Fork 237
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add app directory overriding w/ WATSON_DIR env var
- Loading branch information
Julien Maupetit
committed
Feb 6, 2016
1 parent
d168b2b
commit bfa175c
Showing
2 changed files
with
8 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,7 +50,7 @@ def __init__(self, **kwargs): | |
self._config = None | ||
self._config_changed = False | ||
|
||
self._dir = kwargs.pop('config_dir', click.get_app_dir('watson')) | ||
self._dir = kwargs.pop('config_dir') or click.get_app_dir('watson') | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
jmaupetit
Member
|
||
|
||
self.config_file = os.path.join(self._dir, 'config') | ||
self.frames_file = os.path.join(self._dir, 'frames') | ||
|
This should be
kwargs.pop('config_dir', None)
here. Otherwise you get aKeyError
whenconfig_dir
is not passed in thekwargs
.