]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-disk: print subprocess.CalledProcessError on error
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Mon, 25 Mar 2013 13:36:41 +0000 (14:36 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Mon, 25 Mar 2013 13:36:41 +0000 (14:36 +0100)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/ceph-disk

index 377548df82b52c0b170ccc2065137c32a87ae691..40ee0476c397df4813279d39ec7cb75cc45a7f2e 100755 (executable)
@@ -461,7 +461,7 @@ def dmcrypt_map(
         return dev
 
     except subprocess.CalledProcessError as e:
-        raise Error('unable to map device', rawdev)
+        raise Error('unable to map device', rawdev, e)
 
 
 def dmcrypt_unmap(
@@ -477,7 +477,7 @@ def dmcrypt_unmap(
         subprocess.check_call(args)
 
     except subprocess.CalledProcessError as e:
-        raise Error('unable to unmap device', _uuid)
+        raise Error('unable to unmap device', _uuid, e)
 
 
 def mount(
@@ -548,7 +548,7 @@ def get_free_partition_index(dev):
                 ],
             )
     except subprocess.CalledProcessError as e:
-        print 'cannot read partition index; assume it isn\'t present\n'
+        print 'cannot read partition index; assume it isn\'t present\n (Error: %s)' % e
         return 1
 
     if not lines: