Skip to content

Commit

Permalink
Fix pylint warning W0707(raise-missing-from)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikmatko committed Oct 31, 2020
1 parent 0cdfe91 commit b4f0120
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aioamqp/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,11 +456,11 @@ async def channel(self, **kwargs):
await self.ensure_open()
try:
channel_id = self.channels_ids_free.pop()
except KeyError:
except KeyError as ex:
assert self.server_channel_max is not None, 'connection channel-max tuning not performed'
# channel-max = 0 means no limit
if self.server_channel_max and self.channels_ids_ceil > self.server_channel_max:
raise exceptions.NoChannelAvailable()
raise exceptions.NoChannelAvailable() from ex
self.channels_ids_ceil += 1
channel_id = self.channels_ids_ceil
channel = self.CHANNEL_FACTORY(self, channel_id, **kwargs)
Expand Down

0 comments on commit b4f0120

Please sign in to comment.