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."""
pywikibot-commits@lists.wikimedia.org