diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2013-08-09 10:10:42 +0100 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2013-08-09 10:10:42 +0100 |
commit | 13c711b5f980029a0cb6918521af906f3e85062a (patch) | |
tree | ec778d3739c84a83fd17566d9432020b84b0d97b | |
parent | e280f1639c46e0f80fc3d779343486b74723a6d1 (diff) | |
parent | 25bdeb2ff59433d78bca0f46f61b7c1c463cb6ff (diff) | |
download | cliapp-13c711b5f980029a0cb6918521af906f3e85062a.tar.gz |
Merge remote-tracking branch 'origin/trunk' into baserock/morph
Use the upstreamed fix to pipeline return codes.
-rw-r--r-- | NEWS | 5 | ||||
-rw-r--r-- | README | 4 | ||||
-rw-r--r-- | cliapp.5 | 2 | ||||
-rw-r--r-- | cliapp/__init__.py | 2 | ||||
-rw-r--r-- | cliapp/runcmd.py | 3 | ||||
-rw-r--r-- | debian/changelog | 7 |
6 files changed, 17 insertions, 6 deletions
@@ -1,9 +1,12 @@ NEWS for cliapp =============== -Version UNRELEASED +Version 1.20130808 ------------------ +* Bug fix to cliapp.runcmd pipeline handling: the pipeline now returns + failure if any of the processes fails, rather than only the last one. + Found and reported by Richard Maw. * Fix a problem in the pipeline code in runcmd. Reported and fix provided by Richard Maw. @@ -25,8 +25,8 @@ incompatible way. `DATE` is the date of the release. Legalese -------- -# Copyright (C) 2011, 2012 Lars Wirzenius -# Copyright (C) 2012 Codethink Limited +# Copyright (C) 2011-2013 Lars Wirzenius +# Copyright (C) 2012-2013 Codethink Limited # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -1,4 +1,4 @@ - .\" Copyright (C) 2011, 2012 Lars Wirzenius +.\" Copyright (C) 2011, 2012 Lars Wirzenius .\" .\" This program is free software; you can redistribute it and/or modify .\" it under the terms of the GNU General Public License as published by diff --git a/cliapp/__init__.py b/cliapp/__init__.py index 899a62d..6e4d408 100644 --- a/cliapp/__init__.py +++ b/cliapp/__init__.py @@ -15,7 +15,7 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -__version__ = '1.20130613' +__version__ = '1.20130808' from fmt import TextFormat diff --git a/cliapp/runcmd.py b/cliapp/runcmd.py index 325b246..6304a48 100644 --- a/cliapp/runcmd.py +++ b/cliapp/runcmd.py @@ -210,7 +210,8 @@ def _run_pipeline(procs, feed_stdin, pipe_stdin, pipe_stdout, pipe_stderr): if p.returncode is None: p.wait() - return procs[-1].returncode, ''.join(out), ''.join(err) + errorcodes = [p.returncode for p in procs if p.returncode != 0] or [0] + return errorcodes[-1], ''.join(out), ''.join(err) diff --git a/debian/changelog b/debian/changelog index 3f06851..1114ddc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +python-cliapp (1.20130808-1) unstable; urgency=low + + * New upstream release. Fixes the following problems in Debian: + - Missing import of errno in runcmd.py (Close: #688195) + + -- Lars Wirzenius <liw@liw.fi> Thu, 08 Aug 2013 21:00:23 +0100 + python-cliapp (1.20130613-1) unstable; urgency=low * New upstream version. |