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>
diff --git a/devel/pycocci b/devel/pycocci
index fde8190..b6bb78e 100755
--- a/devel/pycocci
+++ b/devel/pycocci
@@ -41,11 +41,6 @@
 
 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 @@
                                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))