diff --git a/pywikibot/editor.py b/pywikibot/editor.py index e878a5d0ae..6d61f34dbd 100644 --- a/pywikibot/editor.py +++ b/pywikibot/editor.py @@ -5,7 +5,7 @@ # # (C) Gerrit Holl, 2004 -# (C) Pywikibot team, 2004-2015 +# (C) Pywikibot team, 2004-2017 # # Distributed under the terms of the MIT license. # @@ -118,7 +118,7 @@ def edit(self, text, jumpIndex=None, highlight=None): os.unlink(tempFilename) if isinstance(gui, ImportError): - raise pywikibot.Error( + raise ImportError( 'Could not load GUI modules: %s\nNo editor available.\n' 'Set your favourite editor in user-config.py "editor", ' 'or install python packages tkinter and idlelib, which ' diff --git a/pywikibot/specialbots.py b/pywikibot/specialbots.py index 72e079cdfd..bd6c4d295c 100644 --- a/pywikibot/specialbots.py +++ b/pywikibot/specialbots.py @@ -354,6 +354,8 @@ def process_filename(self, file_url=None): editor = editarticle.TextEditor() try: newDescription = editor.edit(self.description) + except ImportError: + raise except Exception as e: pywikibot.error(e) continue