Bugfix: proper plugin configuration was reset

Before this patch, if config was ['/some/path'] then it would enter the
else block and config would be set to [].

The regression this patch fixes was introduced by 700db154.
pull/15281/head
jpic 8 years ago
parent cca084c89d
commit da175d0a57

@ -66,7 +66,7 @@ class PluginLoader:
if config and not isinstance(config, list):
config = [config]
else:
elif not config:
config = []
self.config = config

@ -75,3 +75,7 @@ class TestErrors(unittest.TestCase):
#with patch('glob.glob', mock_glob):
# pass
def test_plugin__config(self):
config = ['/one', '/two']
pl = PluginLoader('test', '', config, 'test_plugin')
self.assertEqual(pl.config, config)

Loading…
Cancel
Save