summaryrefslogtreecommitdiff
path: root/gitlab/base.py
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvainpocentek@gmail.com>2019-02-24 17:37:53 +0100
committerGitHub <noreply@github.com>2019-02-24 17:37:53 +0100
commite58d2a8567545ce14a6e1ee64423fe12f571b2ca (patch)
tree8d235bd7017d5c35238bff133e1ac143542577c2 /gitlab/base.py
parent39cb97d0f15b675f308a052f0c4856d467971f14 (diff)
parentb08efcb9d155c20fa938534dd2d912f5191eede6 (diff)
downloadgitlab-e58d2a8567545ce14a6e1ee64423fe12f571b2ca.tar.gz
Merge pull request #707 from python-gitlab/fix/python-tests
fix: use python2 compatible syntax for super
Diffstat (limited to 'gitlab/base.py')
-rw-r--r--gitlab/base.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/gitlab/base.py b/gitlab/base.py
index c3da077..7a88881 100644
--- a/gitlab/base.py
+++ b/gitlab/base.py
@@ -99,11 +99,16 @@ class RESTObject(object):
def __eq__(self, other):
if self.get_id() and other.get_id():
return self.get_id() == other.get_id()
- return super().__eq__(other)
+ return super(RESTObject, self) == other
+
+ def __ne__(self, other):
+ if self.get_id() and other.get_id():
+ return self.get_id() != other.get_id()
+ return super(RESTObject, self) != other
def __hash__(self):
if not self.get_id():
- return super().__hash__()
+ return super(RESTObject, self).__hash__()
return hash(self.get_id())
def _create_managers(self):