Skip to content

Commit

Permalink
Fix bugs when no plugins input or wrong input
Browse files Browse the repository at this point in the history
JIRA: PDC-1564
  • Loading branch information
simozhan committed Jul 5, 2016
1 parent bfb223e commit e2d182c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pdc_client/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,10 @@ def load_plugins(self):
raise TypeError('Server must be specified')
config = pdc_client.read_config_file(server)
plugins = DEFAULT_PLUGINS
if config and config[CONFIG_PLUGINS_KEY_NAME]:
plugins = config[CONFIG_PLUGINS_KEY_NAME]
if config and config.get(CONFIG_PLUGINS_KEY_NAME):
plugins = config.get(CONFIG_PLUGINS_KEY_NAME)
if not isinstance(plugins, list):
raise TypeError('Plugins must be a list')

for dir in PLUGIN_DIRS:
self.logger.debug('Loading plugins from {0}'.format(dir))
Expand Down

0 comments on commit e2d182c

Please sign in to comment.