XZise has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/184244

Change subject: [FIX] gui: Fix import errors of gui module
......................................................................

[FIX] gui: Fix import errors of gui module

The gui imports are invalid and thus it wasn't possible to use the
tkinter editor. The relative import in editor.py was neither in Python 3
nor in Python 2 valid and introduced with
728524b6a94c56a9fe92f338bfa5a8149e0a6ab5. The import in
terminal_interface_base.py is valid in Python 2 but not in Python 3 so
changed that into an absolute also.

Change-Id: I6fb408452ff7878e67b3edb953a02526af97c0e3
---
M pywikibot/editor.py
M pywikibot/userinterfaces/terminal_interface_base.py
2 files changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/44/184244/1

diff --git a/pywikibot/editor.py b/pywikibot/editor.py
index d3e268a..13db04d 100644
--- a/pywikibot/editor.py
+++ b/pywikibot/editor.py
@@ -4,7 +4,7 @@
 
 #
 # (C) Gerrit Holl, 2004
-# (C) Pywikibot team, 2004-2014
+# (C) Pywikibot team, 2004-2015
 #
 # Distributed under the terms of the MIT license.
 #
@@ -93,7 +93,7 @@
                 return newcontent
 
         try:
-            import gui  # noqa
+            import pywikibot.userinterfaces.gui  # noqa
         except ImportError as e:
             raise pywikibot.Error(
                 'Could not load GUI modules: %s\nNo editor available.\n'
diff --git a/pywikibot/userinterfaces/terminal_interface_base.py 
b/pywikibot/userinterfaces/terminal_interface_base.py
index 6d2ceea..c367b65 100755
--- a/pywikibot/userinterfaces/terminal_interface_base.py
+++ b/pywikibot/userinterfaces/terminal_interface_base.py
@@ -331,7 +331,7 @@
         @rtype: unicode or None
         """
         try:
-            import gui
+            from pywikibot.userinterfaces import gui
         except ImportError as e:
             print('Could not load GUI modules: %s' % e)
             return text

-- 
To view, visit https://gerrit.wikimedia.org/r/184244
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6fb408452ff7878e67b3edb953a02526af97c0e3
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to