pika/pika — pull request #355 by cenkalti (2013-06-04 16:43:21+00:00)
Title: I have fixed a bug that occurs during poll().

When a signal is received during poll() an exception is thrown:

```
Stacktrace (most recent call last):
...
File "kuyruk/channel.py", line 63, in close
self.channel.close()
File "pika/channel.py", line 384, in close
self._on_closeok, [spec.Channel.CloseOk])
File "pika/adapters/blocking_connection.py", line 1000, in _rpc
self._wait_on_response(method_frame))
File "pika/adapters/blocking_connection.py", line 1026, in _send_method
self.connection.process_data_events()
File "pika/adapters/blocking_connection.py", line 168, in process_data_events
if self._handle_read():
File "pika/adapters/blocking_connection.py", line 271, in _handle_read
if self._read_poller.ready():
File "pika/adapters/blocking_connection.py", line 54, in ready
events = self.poller.poll(self.poll_timeout)
error: (4, 'Interrupted system call')
```

In case of interruption it is safe to retry and most of the IO related libraries in stdlib already does it. You can find more information on this [StackOverflow thread](http://stackoverflow.com/questions/5633067/signal-handling-in-pylons) and this [Python issue](http://bugs.python.org/issue9867).