Whym has uploaded a new change for review. https://gerrit.wikimedia.org/r/134813
Change subject: Clarify error and message ...................................................................... Clarify error and message One change is to narrow down an Error into InvalidTitle, the other is to add the text itself to the message reporting regex match against it. Change-Id: Ibf120f025047e0dde27cd9af512526f444563949 --- M pywikibot/page.py 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/13/134813/1 diff --git a/pywikibot/page.py b/pywikibot/page.py index 3883961..fc01929 100644 --- a/pywikibot/page.py +++ b/pywikibot/page.py @@ -3287,7 +3287,7 @@ if newsite == self._site: if not t: # Can't have an empty self-link - raise pywikibot.Error( + raise pywikibot.InvalidTitle( "Invalid link title: '%s'" % self._text) firstPass = False continue @@ -3305,7 +3305,7 @@ m = Link.illegal_titles_pattern.search(t) if m: raise pywikibot.InvalidTitle( - u"contains illegal char(s) '%s'" % m.group(0)) + u"'%s' contains illegal char(s) '%s'" % (t, m.group(0))) # Pages with "/./" or "/../" appearing in the URLs will # often be unreachable due to the way web browsers deal -- To view, visit https://gerrit.wikimedia.org/r/134813 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibf120f025047e0dde27cd9af512526f444563949 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Whym <w...@whym.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits