John Vandenberg has uploaded a new change for review.
https://gerrit.wikimedia.org/r/160437
Change subject: Fix Namespace.__ne__
......................................................................
Fix Namespace.__ne__
__ne__ should call __eq__ and invert result
Change-Id: I3043ae71f89a7aba6a698ea9576ced416696ac8f
---
M pywikibot/site.py
1 file changed, 1 insertion(+), 4 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core
refs/changes/37/160437/1
diff --git a/pywikibot/site.py b/pywikibot/site.py
index 4967aa0..7088b96 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -350,10 +350,7 @@
def __ne__(self, other):
"""Compare whether two namespace objects are not equal."""
- if self.id == other.id:
- return False
- else:
- return True
+ return not self.__eq__(other)
def _cmpkey(self):
"""Return the ID as a comparison key."""
--
To view, visit https://gerrit.wikimedia.org/r/160437
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3043ae71f89a7aba6a698ea9576ced416696ac8f
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits