From: Danny Al-Gaaf Date: Mon, 25 Mar 2013 13:36:41 +0000 (+0100) Subject: ceph-disk: print subprocess.CalledProcessError on error X-Git-Tag: v0.56.5~5^2~22 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bd8bb984806a1dbc3514c3a2a8980a03cfb2bc23;p=ceph.git ceph-disk: print subprocess.CalledProcessError on error Signed-off-by: Danny Al-Gaaf (cherry picked from commit 543327b1f2a9efe8083bb196433c4bcf83883269) --- diff --git a/src/ceph-disk b/src/ceph-disk index 4d78507706dc..f8c18b41d492 100755 --- a/src/ceph-disk +++ b/src/ceph-disk @@ -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: