jenkins-bot has submitted this change and it was merged.

Change subject: check argument to removeClaims() so that if single claim is 
provided it will make a one element list with that claim
......................................................................


check argument to removeClaims() so that if single claim is provided it will 
make a one element list with that claim

Change-Id: Icc4a842e874f7f6cf341872c305e41b942087163
---
M pywikibot/page.py
1 file changed, 5 insertions(+), 0 deletions(-)

Approvals:
  Xqt: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/pywikibot/page.py b/pywikibot/page.py
index 78ce1d0..ca159fd 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -2670,7 +2670,12 @@
         """
         Removes the claims from the item
         @type claims: list
+
         """
+        # this check allows single claims to be remove by pushing them into a
+        # list of length one.
+        if isinstance(claims, pywikibot.Claim):
+            claims = [claims]
         self.repo.removeClaims(claims, **kwargs)
 
 

-- 
To view, visit https://gerrit.wikimedia.org/r/91795
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Icc4a842e874f7f6cf341872c305e41b942087163
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Maximilianklein <isa...@gmail.com>
Gerrit-Reviewer: Xqt <i...@gno.de>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to