diff options
author | Arend van Spriel <arend@broadcom.com> | 2014-05-01 18:03:37 -0700 |
---|---|---|
committer | Luis R. Rodriguez <mcgrof@do-not-panic.com> | 2014-05-01 18:44:14 -0700 |
commit | 3fcd1b1eae800f5a3c4a0f9760986d9af5882cf7 (patch) | |
tree | ae5cf1914aa07e5e3177789838b397dd0509ec8e | |
parent | a559c48f39eabfc327411c0e9c4d4f0eb8b1fb28 (diff) |
backports: lib: remove raising ExecutionError exception
In spatch a ExecutionError was raised, but that causes the thread
to finish without closing the outfile and more importantly without
putting (ret, fn) tuple on the return queue. This results in the
threaded_spatch routine to get stuck on the ret_q.get() call. This
patch removes raising the ExecutionError and just return the tuple.
The non-zero return code will result in ExecutionErrorThread exception
anyway.
Signed-off-by: Arend van Spriel <arend@broadcom.com>
[mcgrof]: rebased to fit into pycocci
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
-rwxr-xr-x | devel/pycocci | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/devel/pycocci b/devel/pycocci index fde81903..b6bb78eb 100755 --- a/devel/pycocci +++ b/devel/pycocci @@ -41,11 +41,6 @@ class tempdir(object): class CoccinelleError(Exception): pass -class ExecutionError(CoccinelleError): - def __init__(self, cmd, errcode): - self.error_code = errcode - print('Failed command:') - print(' '.join(cmd)) class ExecutionErrorThread(CoccinelleError): def __init__(self, errcode, fn, cocci_file, threads, t, logwrite, print_name): @@ -92,8 +87,6 @@ def spatch(cocci_file, outdir, stdout=outfile, stderr=subprocess.STDOUT, close_fds=True, universal_newlines=True) sprocess.wait() - if sprocess.returncode != 0: - raise ExecutionError(cmd, sprocess.returncode) outfile.close() ret_q.put((sprocess.returncode, fn)) |