summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2013-08-09 10:10:42 +0100
committerRichard Maw <richard.maw@codethink.co.uk>2013-08-09 10:10:42 +0100
commit13c711b5f980029a0cb6918521af906f3e85062a (patch)
treeec778d3739c84a83fd17566d9432020b84b0d97b
parente280f1639c46e0f80fc3d779343486b74723a6d1 (diff)
parent25bdeb2ff59433d78bca0f46f61b7c1c463cb6ff (diff)
downloadcliapp-13c711b5f980029a0cb6918521af906f3e85062a.tar.gz
Merge remote-tracking branch 'origin/trunk' into baserock/morph
Use the upstreamed fix to pipeline return codes.
-rw-r--r--NEWS5
-rw-r--r--README4
-rw-r--r--cliapp.52
-rw-r--r--cliapp/__init__.py2
-rw-r--r--cliapp/runcmd.py3
-rw-r--r--debian/changelog7
6 files changed, 17 insertions, 6 deletions
diff --git a/NEWS b/NEWS
index 4b89bf8..86418bb 100644
--- a/NEWS
+++ b/NEWS
@@ -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.
diff --git a/README b/README
index c10c8dd..1fd7a39 100644
--- a/README
+++ b/README
@@ -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
diff --git a/cliapp.5 b/cliapp.5
index 509c2b4..bc2fa4d 100644
--- a/cliapp.5
+++ b/cliapp.5
@@ -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.