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
.
This commit is contained in:
parent
cca084c89d
commit
da175d0a57
2 changed files with 5 additions and 1 deletions
|
@ -66,7 +66,7 @@ class PluginLoader:
|
||||||
|
|
||||||
if config and not isinstance(config, list):
|
if config and not isinstance(config, list):
|
||||||
config = [config]
|
config = [config]
|
||||||
else:
|
elif not config:
|
||||||
config = []
|
config = []
|
||||||
|
|
||||||
self.config = config
|
self.config = config
|
||||||
|
|
|
@ -75,3 +75,7 @@ class TestErrors(unittest.TestCase):
|
||||||
#with patch('glob.glob', mock_glob):
|
#with patch('glob.glob', mock_glob):
|
||||||
# pass
|
# pass
|
||||||
|
|
||||||
|
def test_plugin__config(self):
|
||||||
|
config = ['/one', '/two']
|
||||||
|
pl = PluginLoader('test', '', config, 'test_plugin')
|
||||||
|
self.assertEqual(pl.config, config)
|
||||||
|
|
Loading…
Reference in a new issue