summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary Lowell <glowell@inktank.com>2013-04-02 12:11:10 -0700
committerSage Weil <sage@inktank.com>2013-04-26 13:40:07 -0700
commitc71fb8d5b39667fc2c9f7e898ced53059d3f1eec (patch)
treeadf4971ad8073482ca135a77469fb2315a982b23
parent1b86b1c7618b1ab93e25e1abf79bbe0a992c8526 (diff)
downloadceph-c71fb8d5b39667fc2c9f7e898ced53059d3f1eec.tar.gz
ceph-disk: CalledProcessError has no output keyword on 2.6
Signed-off-by: Gary Lowell <gary.lowell@inktank.com> (cherry picked from commit a793853850ee135de14b9237f7023cadcdb8575c)
-rwxr-xr-xsrc/ceph-disk6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ceph-disk b/src/ceph-disk
index eebf2a268b6..af50c77339b 100755
--- a/src/ceph-disk
+++ b/src/ceph-disk
@@ -374,7 +374,6 @@ def get_osd_id(path):
return osd_id
-# TODO depend on python2.7
def _check_output(*args, **kwargs):
process = subprocess.Popen(
stdout=subprocess.PIPE,
@@ -385,7 +384,10 @@ def _check_output(*args, **kwargs):
cmd = kwargs.get("args")
if cmd is None:
cmd = args[0]
- raise subprocess.CalledProcessError(ret, cmd, output=out)
+ #raise subprocess.CalledProcessError(ret, cmd, output=out)
+ error = subprocess.CalledProcessError(ret, cmd)
+ error.output = out
+ raise error
return out