New submission from Nikolaus Rath <nikol...@rath.org>:

The attached test program calls apply_async with a function that will raise 
CalledProcessError. However, when result.get() is called, it raises a TypeError 
and the program hangs:

$ ./bug.py
ERROR:root:ops
Traceback (most recent call last):
  File "./bug.py", line 19, in run_with
    dW1 = run_dcon()
  File "./bug.py", line 26, in run_dcon
    subprocess.check_call(['dcon'], stdout=fh, stderr=fh)
  File "/usr/lib/python2.6/subprocess.py", line 498, in check_call
    raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '['dcon']' returned non-zero exit status 127
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.6/threading.py", line 484, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/python2.6/multiprocessing/pool.py", line 259, in 
_handle_results
    task = get()
TypeError: ('__init__() takes exactly 3 arguments (1 given)', <class 
'subprocess.CalledProcessError'>, ())

----------
components: Library (Lib)
files: bug.py
messages: 111827
nosy: Nikratio
priority: normal
severity: normal
status: open
title: multiprocessing.pool.AsyncResult.get() messes up exceptions
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file18233/bug.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9400>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to