Use LookupError

This commit is contained in:
Ask Solem 2016-06-14 14:27:26 -07:00
parent 92e9084ce2
commit b1ad2b159a
2 changed files with 2 additions and 2 deletions

View File

@ -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']))

View File

@ -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()