get_ident as a standalone function is useless

This commit is contained in:
Tomasz Fluxid Kowalczyk 2012-01-28 13:54:22 +01:00
parent 6693450b47
commit 8db7e1223a

View File

@ -15,12 +15,6 @@ class SyncServerProtocol(CommandProtocol):
def connectionLost(self, reason): def connectionLost(self, reason):
self.factory.remove_watcher(self) self.factory.remove_watcher(self)
def get_ident(self):
return '|'.join((
self.transport.getPeer().host,
str(id(self)),
))
def handle_init_iam(self, arg): def handle_init_iam(self, arg):
self.factory.add_watcher(self, arg.strip()) self.factory.add_watcher(self, arg.strip())
self.change_state('connected') self.change_state('connected')
@ -58,7 +52,10 @@ class SyncServerProtocol(CommandProtocol):
self.factory.seek(self, position) self.factory.seek(self, position)
def __hash__(self): def __hash__(self):
return hash(self.get_ident()) return hash('|'.join((
self.transport.getPeer().host,
str(id(self)),
)))
def send_state(self, paused, position, who_last_changed): def send_state(self, paused, position, who_last_changed):