Skip to content

Commit 7123991

Browse files
committed
Check for inherited module when creating class instance.
1 parent 67c3d1c commit 7123991

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

myDevices/plugins/manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def load_plugin_from_file(self, filename):
5757
if 'init_args' not in plugin:
5858
plugin['init_args'] = '{}'
5959
self.override_plugin_value(config, section, 'init_args', plugin)
60-
if not inherit_items or inherit_items['class'] is not plugin['class'] or inherit_items['init_args'] is not plugin['init_args']:
60+
if not inherit_items or [key for key in ('module', 'class', 'init_args') if inherit_items[key] is not plugin[key]]:
6161
info('Creating instance of {} for {}'.format(plugin['class'], plugin['name']))
6262
folder = os.path.dirname(filename)
6363
if folder not in sys.path:

0 commit comments

Comments
 (0)