Commits

Jacob Söndergaard committed efb94b2

avoid raising a Buried exception when using the bury command

  • Participants
  • Parent commits 39a3d39

Comments (0)

Files changed (2)

File beanstalktc/beanstalktc.py

 limitations under the License.
 """
 
-__version__ = '0.3.1'
+__version__ = '0.3.2'
 
 import socket
 import time
         error = None
         err_args = dict(request=req, status=status, values=values)
 
-        if status == 'BURIED':
+        if req.ok and status in req.ok:
+            # avoid raising a Buried exception when using the bury command
+            pass
+        elif status == 'BURIED':
             error = Buried(**err_args)
         elif status == 'TIMED_OUT':
             error = TimedOut(**err_args)
             error = DeadlineSoon(**err_args)
         elif req.err and status in req.err:
             error = CommandFailed(**err_args)
-        elif not req.ok or status not in req.ok:
+        else:
             error = UnexpectedResponse(**err_args)
 
         resp = Bunch(req=req, status=status, values=values, error=error)
 from setuptools import setup
 
 setup(name='beanstalktc',
-      version='0.3.1',
+      version='0.3.2',
       description='An async beanstalkd client for Tornado',
       author='Jacob Sondergaard',
       author_email='jacob@nephics.com',