jenkins-bot has submitted this change and it was merged.

Change subject: Ignore InvalidIsbnException with -format option
......................................................................


Ignore InvalidIsbnException with -format option

Do not raise the exception but continue with the next number/page

Change-Id: I48de6b4d20d1f227d4fc5ee86d680583e458220b
---
M scripts/isbn.py
1 file changed, 2 insertions(+), 4 deletions(-)

Approvals:
  Merlijn van Deen: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/scripts/isbn.py b/scripts/isbn.py
index 20e76aa..db1ed49 100755
--- a/scripts/isbn.py
+++ b/scripts/isbn.py
@@ -36,7 +36,7 @@
 
 """
 #
-# (C) Pywikibot team, 2009-2013
+# (C) Pywikibot team, 2009-2014
 #
 # Distributed under the terms of the MIT license.
 #
@@ -44,10 +44,8 @@
 #
 
 import re
-
 import pywikibot
 from pywikibot import pagegenerators, i18n
-
 
 docuReplacements = {
     '&params;': pagegenerators.parameterHelp,
@@ -1364,10 +1362,10 @@
     code = match.group('code')
     try:
         i = getIsbn(code)
+        i.format()
     except InvalidIsbnException:
         # don't change
         return code
-    i.format()
     return i.code
 
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I48de6b4d20d1f227d4fc5ee86d680583e458220b
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: Meno25 <[email protected]>
Gerrit-Reviewer: Merlijn van Deen <[email protected]>
Gerrit-Reviewer: Pyfisch <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to