jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/565768 )
Change subject: [bugfix] Check whether Claim has an "id" key ......................................................................
[bugfix] Check whether Claim has an "id" key
Bug: T174870 Change-Id: I9ad6f6f8a1d6db5c531fe0146aa7f0082f29fa47 --- M pywikibot/page.py M tests/isbn_tests.py 2 files changed, 2 insertions(+), 2 deletions(-)
Approvals: Dvorapa: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/page.py b/pywikibot/page.py index ae2d286..b675f66 100644 --- a/pywikibot/page.py +++ b/pywikibot/page.py @@ -4154,7 +4154,8 @@ or claim not in diffto_claims[prop]): temp[prop].append(claim)
- claim_ids.add(claim['id']) + if 'id' in claim: + claim_ids.add(claim['id'])
for prop, prop_claims in diffto_claims.items(): for claim in prop_claims: diff --git a/tests/isbn_tests.py b/tests/isbn_tests.py index 43bea9c..ee74120 100644 --- a/tests/isbn_tests.py +++ b/tests/isbn_tests.py @@ -284,7 +284,6 @@ main('-page:' + self.test_page_qid, '-always', '-format') self.assertEqual(self.setTarget_value, '0-9752298-0-X')
- @unittest.expectedFailure # See T174870 def test_isbn_to13(self): """Test to13 using the bot and wikibase.""" main('-page:' + self.test_page_qid, '-always', '-to13')
pywikibot-commits@lists.wikimedia.org