earl / beanstalkc

A simple beanstalkd client library for Python
Apache License 2.0
458 stars 115 forks source link

stats_tube('non-existent-tube') Raises SocketErr #56

Closed geudrik closed 9 years ago

geudrik commented 9 years ago
[Tue Jan 13 18:53:44 2015] [error] [client 10.0.0.28]     "jobQueue_high"     :   bQueue.stats_tube('jobQueue_high'),
[Tue Jan 13 18:53:44 2015] [error] [client 10.0.0.28]   File "/usr/local/lib/python2.7/dist-packages/beanstalkc.py", line 217, in stats_tube
[Tue Jan 13 18:53:44 2015] [error] [client 10.0.0.28]     ['NOT_FOUND'])
[Tue Jan 13 18:53:44 2015] [error] [client 10.0.0.28]   File "/usr/local/lib/python2.7/dist-packages/beanstalkc.py", line 118, in _interact_yaml
[Tue Jan 13 18:53:44 2015] [error] [client 10.0.0.28]     size, = self._interact(command, expected_ok, expected_err)
[Tue Jan 13 18:53:44 2015] [error] [client 10.0.0.28]   File "/usr/local/lib/python2.7/dist-packages/beanstalkc.py", line 86, in _interact
[Tue Jan 13 18:53:44 2015] [error] [client 10.0.0.28]     SocketError.wrap(self._socket.sendall, command)
[Tue Jan 13 18:53:44 2015] [error] [client 10.0.0.28]   File "/usr/local/lib/python2.7/dist-packages/beanstalkc.py", line 43, in wrap
[Tue Jan 13 18:53:44 2015] [error] [client 10.0.0.28]     raise SocketError(err)
[Tue Jan 13 18:53:44 2015] [error] [client 10.0.0.28] SocketError: [Errno 9] Bad file descriptor

Should return None if the tube doesn't exist

geudrik commented 9 years ago

nose pinch I cant read. Go ahead and remove this issue. Sorry for the spam.

Eg: my socket was closing prematurely (as indicated by the SocketError)