Page MenuHomePhabricator

cosmetic_changes should not break for InvalidIsbnException
Closed, ResolvedPublic

Description

Exception in thread Put-Thread:
Traceback (most recent call last):
  File "C:\Python27\lib\threading.py", line 810, in __bootstrap_inner
    self.run()
  File "C:\Python27\lib\threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "C:\pwb\SVN\core\pywikibot\__init__.py", line 717, in async_manager
    request(*args, **kwargs)
  File "C:\pwb\SVN\core\pywikibot\page.py", line 1050, in _save
    comment = self._cosmetic_changes_hook(comment) or comment
  File "C:\pwb\SVN\core\pywikibot\page.py", line 1101, in _cosmetic_changes_hook

    self.text = ccToolkit.change(old)
  File "C:\pwb\SVN\core\scripts\cosmetic_changes.py", line 291, in change
    new_text = self._change(text)
  File "C:\pwb\SVN\core\scripts\cosmetic_changes.py", line 285, in _change
    text = self.safe_execute(method, text)
  File "C:\pwb\SVN\core\scripts\cosmetic_changes.py", line 272, in safe_execute
    result = method(text)
  File "C:\pwb\SVN\core\scripts\cosmetic_changes.py", line 955, in fix_ISBN
    text, strict=False if self.ignore == CANCEL_MATCH else True)
  File "C:\pwb\SVN\core\scripts\cosmetic_changes.py", line 219, in _reformat_ISBNs
    text, lambda match: _format_isbn_match(match, strict=strict))
  File "C:\pwb\SVN\core\pywikibot\textlib.py", line 1248, in reformat_ISBNs
    text = isbnR.sub(match_func, text)
  File "C:\pwb\SVN\core\scripts\cosmetic_changes.py", line 219, in <lambda>
    text, lambda match: _format_isbn_match(match, strict=strict))
  File "C:\pwb\SVN\core\scripts\cosmetic_changes.py", line 201, in _format_isbn_match
    isbn.format()
  File "C:\pwb\SVN\core\scripts\isbn.py", line 1329, in format
    ISBN.format(self)
  File "C:\pwb\SVN\core\scripts\isbn.py", line 1220, in format
    % self.code)
InvalidIsbnException: ISBN 3-00-013343-7: publisher number unknown.

Event Timeline

Xqt raised the priority of this task from to Needs Triage.
Xqt updated the task description. (Show Details)
Xqt subscribed.
Restricted Application added subscribers: Aklapper, Unknown Object (MLST). · View Herald TranscriptMay 1 2015, 7:01 PM
Xqt triaged this task as High priority.
Xqt set Security to None.

Change 208357 had a related patch set uploaded (by Xqt):
Don't break cosmetic_changes for InvalidIsbnException

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

Change 208357 merged by jenkins-bot:
Don't break cosmetic_changes for InvalidIsbnException

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