jenkins-bot has submitted this change and it was merged. ( 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, 3 insertions(+), 2 deletions(-)
Approvals: jenkins-bot: Verified Xqt: Looks good to me, approved
diff --git a/scripts/claimit.py b/scripts/claimit.py index 32860ad..cdf8256 100755 --- a/scripts/claimit.py +++ b/scripts/claimit.py @@ -107,12 +107,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(),))
pywikibot-commits@lists.wikimedia.org