diff --git a/openlp/core/lib/pluginmanager.py b/openlp/core/lib/pluginmanager.py index aefb11fc1..d248469c1 100644 --- a/openlp/core/lib/pluginmanager.py +++ b/openlp/core/lib/pluginmanager.py @@ -93,13 +93,12 @@ class PluginManager(object): try: # Use the "imp" library to try to get around a problem with the PyUNO library which # monkey-patches the __import__ function to do some magic. This causes issues with our tests. - # First, try to find the module we want to import, searching the directory in ``root`` + # First, try to find the module we want to import, searching the directory in root fp, path_name, description = imp.find_module(module_name, [root]) - # Then load the module (do the actual import) using the details from ``find_module()`` + # Then load the module (do the actual import) using the details from find_module() imp.load_module(module_name, fp, path_name, description) except ImportError, e: - log.exception(u'Failed to import module %s on path %s for reason %s', - module_name, path, e.args[0]) + log.exception(u'Failed to import module %s on path %s: %s', module_name, path, e.args[0]) plugin_classes = Plugin.__subclasses__() plugin_objects = [] for p in plugin_classes: diff --git a/tests/functional/openlp_core_lib/test_pluginmanager.py b/tests/functional/openlp_core_lib/test_pluginmanager.py index 3539373e0..bad38d721 100644 --- a/tests/functional/openlp_core_lib/test_pluginmanager.py +++ b/tests/functional/openlp_core_lib/test_pluginmanager.py @@ -89,7 +89,7 @@ class TestPluginManager(TestCase): assert mocked_plugin.createSettingsTab.call_count == 0, \ u'The createMediaManagerItem() method should not have been called.' self.assertEqual(mocked_settings_form.plugins, plugin_manager.plugins, - u'The plugins on the settings form should be the same as the plugins in the plugin manager') + u'The plugins on the settings form should be the same as the plugins in the plugin manager') def hook_settings_tabs_with_active_plugin_and_no_form_test(self): """