Maximilianklein has uploaded a new change for review.
https://gerrit.wikimedia.org/r/91795
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, 3 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core
refs/changes/95/91795/1
diff --git a/pywikibot/page.py b/pywikibot/page.py
index cb06350..1487abd 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -2671,6 +2671,9 @@
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: newchange
Gerrit-Change-Id: Icc4a842e874f7f6cf341872c305e41b942087163
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Maximilianklein <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits