From c71fb8d5b39667fc2c9f7e898ced53059d3f1eec Mon Sep 17 00:00:00 2001 From: Gary Lowell Date: Tue, 2 Apr 2013 12:11:10 -0700 Subject: [PATCH] ceph-disk: CalledProcessError has no output keyword on 2.6 Signed-off-by: Gary Lowell (cherry picked from commit a793853850ee135de14b9237f7023cadcdb8575c) --- src/ceph-disk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ceph-disk b/src/ceph-disk index eebf2a268b617..af50c77339b1b 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 -- 2.39.5