]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-disk: CalledProcessError has no output keyword on 2.6
authorGary Lowell <glowell@inktank.com>
Tue, 2 Apr 2013 19:11:10 +0000 (12:11 -0700)
committerSage Weil <sage@inktank.com>
Fri, 26 Apr 2013 20:40:07 +0000 (13:40 -0700)
Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
(cherry picked from commit a793853850ee135de14b9237f7023cadcdb8575c)

src/ceph-disk

index eebf2a268b6177e35f8493836eeb6629aee1a675..af50c77339b1b6b423b26b7a9db3bff944938564 100755 (executable)
@@ -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