mirror of
https://github.com/openkmip/pykmip
synced 2025-12-15 15:53:36 +00:00
Fixing infinite recursion bug with object inheritance
This change removes all references to self.__class__. In object hierarchies with multiple levels of inheritance, using self.__class__ can cause an infinite loop when resolving references to parent classes.
This commit is contained in:
@@ -89,7 +89,7 @@ class KMIP(object):
|
||||
class KMIPImpl(KMIP):
|
||||
|
||||
def __init__(self):
|
||||
super(self.__class__, self).__init__()
|
||||
super(KMIPImpl, self).__init__()
|
||||
self.logger = logging.getLogger(__name__)
|
||||
self.key_factory = KeyFactory()
|
||||
self.secret_factory = SecretFactory()
|
||||
@@ -393,5 +393,5 @@ class KMIPImpl(KMIP):
|
||||
class InvalidFieldException(Exception):
|
||||
|
||||
def __init__(self, result):
|
||||
super(self.__class__, self).__init__()
|
||||
super(InvalidFieldException, self).__init__()
|
||||
self.result = result
|
||||
|
||||
Reference in New Issue
Block a user