Use set.discard instead of set.remove

This commit is contained in:
Ask Solem 2010-08-13 13:19:05 +02:00
parent 55c72cce04
commit d6b0c84194
1 changed files with 1 additions and 4 deletions

View File

@ -309,10 +309,7 @@ class Transport(base.Transport):
return channel
def close_channel(self, channel):
try:
self._channels.remove(channel)
except KeyError:
pass
self._channels.discard(channel)
def establish_connection(self):
return self # for drain events