]> 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)
committerGary Lowell <glowell@inktank.com>
Wed, 3 Apr 2013 06:01:12 +0000 (23:01 -0700)
Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
src/ceph-disk

index 9c93fb2cd6f9d9136103673f00e3359dacaf3e3b..68a171938c594d35f33e094c4d623b4602f0bd68 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