Matěj Suchánek has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/369398 )
Change subject: [Bugfix] Fix logic in claimit.py ...................................................................... [Bugfix] Fix logic in claimit.py It doesn't make sense to check qualifiers/sources of claims with a different target. (Thanks to JAn Dudík.) Change-Id: I806056dedd92c9d64c07035ed1a7fe0c796008e6 --- M scripts/claimit.py 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/98/369398/1 diff --git a/scripts/claimit.py b/scripts/claimit.py index 32860ad..f37bfd3 100755 --- a/scripts/claimit.py +++ b/scripts/claimit.py @@ -56,6 +56,9 @@ # from __future__ import absolute_import, unicode_literals +__version__ = '$Id$' +# + import pywikibot from pywikibot import pagegenerators, WikidataBot @@ -107,12 +110,13 @@ pywikibot.log( 'Use -exists:p option to override this behavior') break + if not existing.target_equals(claim.getTarget()): + continue # If some attribute of the claim being added # matches some attribute in an existing claim of # the same property, skip the claim, unless the # 'exists' argument overrides it. - if (existing.target_equals(claim.getTarget()) and - 't' not in self.exists_arg): + if 't' not in self.exists_arg: pywikibot.log( 'Skipping %s because claim with same target already exists' % (claim.getID(),)) -- To view, visit https://gerrit.wikimedia.org/r/369398 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I806056dedd92c9d64c07035ed1a7fe0c796008e6 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Matěj Suchánek <matejsuchane...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits