Skip to content

Commit

Permalink
Prevent #436 by iterating the keys and not the dict
Browse files Browse the repository at this point in the history
  • Loading branch information
gmr committed Feb 3, 2014
1 parent 755fcae commit a623f69
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pika/connection.py
Expand Up @@ -1029,7 +1029,8 @@ def _has_open_channels(self):
:rtype: bool
"""
return any([self._channels[num].is_open for num in self._channels])
return any([self._channels[num].is_open for num in
self._channels.keys()])

def _has_pending_callbacks(self, value):
"""Return true if there are any callbacks pending for the specified
Expand Down

0 comments on commit a623f69

Please sign in to comment.