From: Arend van Spriel <arend@broadcom.com>
To: "Luis R. Rodriguez" <mcgrof@kernel.org>
Cc: <backports@vger.kernel.org>, Arend van Spriel <arend@broadcom.com>
Subject: [PATCH V2] backports: lib: remove raising ExecutionError exception
Date: Tue, 29 Apr 2014 11:58:18 +0200 [thread overview]
Message-ID: <1398765498-6957-1-git-send-email-arend@broadcom.com> (raw)
In-Reply-To: <1398422668-11735-1-git-send-email-arend@broadcom.com>
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>
---
A bit late but here is the rebased version.
Regards,
Arend
---
lib/bpcoccinelle.py | 5 -----
1 file changed, 5 deletions(-)
diff --git a/lib/bpcoccinelle.py b/lib/bpcoccinelle.py
index a71f425..fc503f1 100644
--- a/lib/bpcoccinelle.py
+++ b/lib/bpcoccinelle.py
@@ -4,9 +4,6 @@ from lib.tempdir import tempdir
class CoccinelleError(Exception):
pass
-class ExecutionError(CoccinelleError):
- def __init__(self, errcode):
- self.error_code = errcode
class ExecutionErrorThread(CoccinelleError):
def __init__(self, errcode, fn, cocci_file, threads, t, logwrite, print_name):
self.error_code = errcode
@@ -48,8 +45,6 @@ def spatch(cocci_file, outdir,
close_fds=True, universal_newlines=True,
cwd=outdir)
sprocess.wait()
- if sprocess.returncode != 0:
- raise ExecutionError(sprocess.returncode)
outfile.close()
ret_q.put((sprocess.returncode, fn))
--
1.7.9.5
next prev parent reply other threads:[~2014-04-29 9:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-25 10:44 [PATCH] backports: lib: remove raising ExecutionError exception Arend van Spriel
2014-04-26 17:20 ` Luis R. Rodriguez
2014-04-29 9:58 ` Arend van Spriel [this message]
2014-05-02 1:06 ` [PATCH V2] " Luis R. Rodriguez
2014-05-02 8:08 ` Arend van Spriel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1398765498-6957-1-git-send-email-arend@broadcom.com \
--to=arend@broadcom.com \
--cc=backports@vger.kernel.org \
--cc=mcgrof@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.