mirror of https://github.com/celery/kombu.git
Use LookupError
This commit is contained in:
parent
92e9084ce2
commit
b1ad2b159a
|
@ -67,7 +67,7 @@ class Channel(virtual.Channel):
|
|||
|
||||
try:
|
||||
item = result[0]['value']
|
||||
except (KeyError, IndexError):
|
||||
except LookupError:
|
||||
raise Empty()
|
||||
self.client.delete(item['_id'])
|
||||
return loads(bytes_to_str(item['payload']))
|
||||
|
|
|
@ -923,7 +923,7 @@ class Transport(base.Transport):
|
|||
while l:
|
||||
try:
|
||||
channel = l.pop()
|
||||
except (IndexError, KeyError): # pragma: no cover
|
||||
except LookupError: # pragma: no cover
|
||||
pass
|
||||
else:
|
||||
channel.close()
|
||||
|
|
Loading…
Reference in New Issue