From 82c29bfcbe0b7424903d06d68025098c8a1be3fd Mon Sep 17 00:00:00 2001 From: Arinerron Date: Sat, 30 Mar 2019 17:25:07 -0700 Subject: [PATCH] Give error details instead of just spontaneously quitting --- onionr/onionrplugins.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/onionr/onionrplugins.py b/onionr/onionrplugins.py index 7595805b..45126c7d 100755 --- a/onionr/onionrplugins.py +++ b/onionr/onionrplugins.py @@ -69,9 +69,10 @@ def enable(name, onionr = None, start_event = True): if not name in enabled_plugins: try: events.call(get_plugin(name), 'enable', onionr) - except ImportError: # Was getting import error on Gitlab CI test "data" + except ImportError as e: # Was getting import error on Gitlab CI test "data" # NOTE: If you are experiencing issues with plugins not being enabled, it might be this resulting from an error in the module # can happen inconsistenly (especially between versions) + logger.debug('Failed to enable module; Import error: %s' % e) return False else: enabled_plugins.append(name) @@ -83,7 +84,8 @@ def enable(name, onionr = None, start_event = True): else: return False else: - logger.error('Failed to enable plugin \"%s\", disabling plugin.' % name) + logger.error('Failed to enable plugin \"%s\" (disabling plugin).' % name) + logger.debug('Plugins folder not found: %s' % get_plugins_folder(str(name).lower())) disable(name) return False