jenkins-bot has submitted this change and it was merged.
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(-)
Approvals:
Mpaa: Looks good to me, approved
jenkins-bot: Verified
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: merged
Gerrit-Change-Id: I3043ae71f89a7aba6a698ea9576ced416696ac8f
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Mpaa <mpaa.wiki(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>