Commit 834eb793 authored by Sam Rushing's avatar Sam Rushing

channel.forget_consumer: handle KeyError.

parent 1744b403
...@@ -463,7 +463,10 @@ class channel: ...@@ -463,7 +463,10 @@ class channel:
self.consumers[con.tag] = con self.consumers[con.tag] = con
def forget_consumer (self, tag): def forget_consumer (self, tag):
try:
del self.consumers[tag] del self.consumers[tag]
except KeyError:
pass
def notify_consumers_of_close (self): def notify_consumers_of_close (self):
for _, con in self.consumers.iteritems(): for _, con in self.consumers.iteritems():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment