XZise has uploaded a new change for review.

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

Change subject: [FIX] Link: Use unicode in error messages
......................................................................

[FIX] Link: Use unicode in error messages

Change-Id: I8b0aafe9824a519fffc44a6fb173e1924a994c17
---
M pywikibot/page.py
1 file changed, 6 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/26/166426/1

diff --git a/pywikibot/page.py b/pywikibot/page.py
index a4ce5cb..6bf04b0 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -4052,7 +4052,7 @@
                 # 'namespace:' is not a valid title
                 if not t:
                     raise pywikibot.InvalidTitle(
-                        "'{0}' has no title.".format(self._text))
+                        u"'{0}' has no title.".format(self._text))
                 self._namespace = ns
                 break
             try:
@@ -4061,7 +4061,7 @@
                 break  # text before : doesn't match any known prefix
             except NoSuchSite:
                 raise pywikibot.Error(
-                    '{0} is not a local page on {1}, and the interwiki prefix '
+                    u'{0} is not a local page on {1}, and the interwiki prefix 
'
                     '{2} is not supported by PyWikiBot!'.format(
                     self._text, self._site, prefix))
             else:
@@ -4069,7 +4069,7 @@
                 if first_other_site:
                     if not self._site.local_interwiki(prefix):
                         raise pywikibot.InvalidTitle(
-                            '{0} links to a non local site {1} via an '
+                            u'{0} links to a non local site {1} via an '
                             'interwiki link to {2}.'.format(
                             self._text, newsite, first_other_site))
                 elif newsite != self._source:
@@ -4102,15 +4102,15 @@
                 or t.endswith(u"/..")
         ):
             raise pywikibot.InvalidTitle(
-                "(contains . / combinations): '%s'"
+                u"(contains . / combinations): '%s'"
                 % self._text)
 
         # Magic tilde sequences? Nu-uh!
         if u"~~~" in t:
-            raise pywikibot.InvalidTitle("(contains ~~~): '%s'" % self._text)
+            raise pywikibot.InvalidTitle(u"(contains ~~~): '%s'" % self._text)
 
         if self._namespace != -1 and len(t) > 255:
-            raise pywikibot.InvalidTitle("(over 255 bytes): '%s'" % t)
+            raise pywikibot.InvalidTitle(u"(over 255 bytes): '%s'" % t)
 
         # "empty" local links can only be self-links
         # with a fragment identifier.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8b0aafe9824a519fffc44a6fb173e1924a994c17
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise <commodorefabia...@gmx.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to