From: Gary Lowell Date: Tue, 2 Apr 2013 19:11:10 +0000 (-0700) Subject: ceph-disk: CalledProcessError has no output keyword on 2.6 X-Git-Tag: v0.62~101 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a793853850ee135de14b9237f7023cadcdb8575c;p=ceph.git ceph-disk: CalledProcessError has no output keyword on 2.6 Signed-off-by: Gary Lowell --- diff --git a/src/ceph-disk b/src/ceph-disk index 9c93fb2cd6f9..68a171938c59 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