[PATCH 3/3] Don't call object's (as a class) __new__ with extra arguments

Vratislav Podzimek vpodzime at redhat.com
Tue Feb 17 14:30:59 UTC 2015


The Python 3 version of the 'object' class raises an exception otherwise, the
Python 2 version of the class ignores them anyway.

Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
 blivet/util.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/blivet/util.py b/blivet/util.py
index ecd3693..5d830df 100644
--- a/blivet/util.py
+++ b/blivet/util.py
@@ -373,7 +373,7 @@ class ObjectID(object):
     _newid_gen = functools.partial(next, itertools.count())
 
     def __new__(cls, *args, **kwargs):
-        self = super(ObjectID, cls).__new__(cls, *args, **kwargs)
+        self = super(ObjectID, cls).__new__(cls)
         self.id = self._newid_gen() # pylint: disable=attribute-defined-outside-init
         return self
 
-- 
2.1.0



More information about the anaconda-patches mailing list