summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorJan Synacek <jsynacek@redhat.com>2014-03-07 10:03:14 +0100
committerJan Synacek <jsynacek@redhat.com>2014-03-07 10:19:08 +0100
commit12187958f92cbe80e172b289a63070bec9c9aaf7 (patch)
tree82d67a49bd9c4cd827cc09bd250b249a3d747210 /commands
parente460bf50714c93df195a5648a9943bca0041145f (diff)
downloadopenlmi-scripts-12187958f92cbe80e172b289a63070bec9c9aaf7.tar.gz
openlmi-scripts-12187958f92cbe80e172b289a63070bec9c9aaf7.tar.xz
openlmi-scripts-12187958f92cbe80e172b289a63070bec9c9aaf7.zip
storage: correctly report mounting errors
Diffstat (limited to 'commands')
-rw-r--r--commands/storage/lmi/scripts/storage/mount.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/commands/storage/lmi/scripts/storage/mount.py b/commands/storage/lmi/scripts/storage/mount.py
index c94bc5a..e379d0b 100644
--- a/commands/storage/lmi/scripts/storage/mount.py
+++ b/commands/storage/lmi/scripts/storage/mount.py
@@ -178,9 +178,8 @@ def mount_create(ns, device, mountpoint, fs_type=None, options=None):
FileSystemSpec=device)
msg = '%s on %s' % (device, mountpoint)
if ret != 0:
- errname = service.SyncCreateMount.CreateMountValues.value_name(ret)
- raise LmiFailed('Cannot create mount: %s: %s.' % (
- msg, errname))
+ raise LmiFailed('Cannot create mount: %s: %s' % (
+ msg, _err))
LOG().info('Successfully created mount: %s', msg)