mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-12 20:44:50 +00:00
[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():
|
for key, value in self.factory.methods.items():
|
||||||
if value.im_self == obj:
|
if value.__self__ == obj:
|
||||||
del self.factory.methods[key]
|
del self.factory.methods[key]
|
||||||
|
|
||||||
def get_object_method(self, name):
|
def get_object_method(self, name):
|
||||||
|
@ -127,7 +127,7 @@ class CustomNotifications(object):
|
|||||||
log.error("The event \"%s\" is not known" % eventtype)
|
log.error("The event \"%s\" is not known" % eventtype)
|
||||||
return False
|
return False
|
||||||
if known_events[eventtype].__module__.startswith('deluge.event'):
|
if known_events[eventtype].__module__.startswith('deluge.event'):
|
||||||
if handler.im_self is self:
|
if handler.__self__ is self:
|
||||||
return True
|
return True
|
||||||
log.error("You cannot register custom notification providers "
|
log.error("You cannot register custom notification providers "
|
||||||
"for built-in event types.")
|
"for built-in event types.")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user