[Python-Modernize] Replace im_self with __self__
This commit is contained in:
parent
fc7a136c70
commit
1ca08ccf95
|
@ -413,7 +413,7 @@ class RPCServer(component.Component):
|
|||
|
||||
"""
|
||||
for key, value in self.factory.methods.items():
|
||||
if value.im_self == obj:
|
||||
if value.__self__ == obj:
|
||||
del self.factory.methods[key]
|
||||
|
||||
def get_object_method(self, name):
|
||||
|
|
|
@ -127,7 +127,7 @@ class CustomNotifications(object):
|
|||
log.error("The event \"%s\" is not known" % eventtype)
|
||||
return False
|
||||
if known_events[eventtype].__module__.startswith('deluge.event'):
|
||||
if handler.im_self is self:
|
||||
if handler.__self__ is self:
|
||||
return True
|
||||
log.error("You cannot register custom notification providers "
|
||||
"for built-in event types.")
|
||||
|
|
Loading…
Reference in New Issue