Skip to content

Commit

Permalink
[Fix] Update isbn.py
Browse files Browse the repository at this point in the history
This file was forgotten and not included in
Ib43948d70d6c4e957043a862bdbf3c9d27eee03a.

Change-Id: I1d61d46050342e56e171dd3edf1204d3992d1101
  • Loading branch information
matejsuchanek committed Aug 26, 2017
1 parent 748e103 commit ea18c42
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/isbn.py
Original file line number Diff line number Diff line change
Expand Up @@ -1540,6 +1540,8 @@ class IsbnWikibaseBot(WikidataBot):

"""ISBN bot to be run on Wikibase sites."""

use_from_page = None

def __init__(self, generator, **kwargs):
"""Constructor."""
self.availableOptions.update({
Expand All @@ -1549,7 +1551,7 @@ def __init__(self, generator, **kwargs):
self.isbn_10_prop_id = kwargs.pop('prop-isbn-10', None)
self.isbn_13_prop_id = kwargs.pop('prop-isbn-13', None)

super(IsbnWikibaseBot, self).__init__(use_from_page=None, **kwargs)
super(IsbnWikibaseBot, self).__init__(**kwargs)

self.generator = generator
if self.isbn_10_prop_id is None:
Expand All @@ -1558,7 +1560,7 @@ def __init__(self, generator, **kwargs):
self.isbn_13_prop_id = self.get_property_by_name('ISBN-13')
self.comment = i18n.twtranslate(pywikibot.Site(), 'isbn-formatting')

def treat(self, page, item):
def treat_page_and_item(self, page, item):
"""Treat a page."""
change_messages = []

Expand Down

0 comments on commit ea18c42

Please sign in to comment.