diff options
author | Jan Safranek <jsafrane@redhat.com> | 2014-01-21 12:22:12 +0100 |
---|---|---|
committer | Jan Safranek <jsafrane@redhat.com> | 2014-01-21 13:22:47 +0100 |
commit | e93eba98fd9bf0b2c2e35f0f6083bba05f97f3e1 (patch) | |
tree | ade0d7c54ac915e285ddc5126fd580920723cb7d /commands/storage/lmi | |
parent | 53ffc986fe4a17817aeeac4d65e01bc66731d8b3 (diff) | |
download | openlmi-scripts-e93eba98fd9bf0b2c2e35f0f6083bba05f97f3e1.tar.gz openlmi-scripts-e93eba98fd9bf0b2c2e35f0f6083bba05f97f3e1.tar.xz openlmi-scripts-e93eba98fd9bf0b2c2e35f0f6083bba05f97f3e1.zip |
Show better error message when mount fails.
Diffstat (limited to 'commands/storage/lmi')
-rw-r--r-- | commands/storage/lmi/scripts/storage/mount.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/commands/storage/lmi/scripts/storage/mount.py b/commands/storage/lmi/scripts/storage/mount.py index 32defa6..f0837a7 100644 --- a/commands/storage/lmi/scripts/storage/mount.py +++ b/commands/storage/lmi/scripts/storage/mount.py @@ -170,9 +170,11 @@ def mount_create(ns, device, mountpoint, fs_type=None, options=None, other_optio FileSystem=filesystem.path, MountPoint=mountpoint, FileSystemSpec=device) - msg = '%s on %s (%s, %s)' % (device, mountpoint, options, other_options) + msg = '%s on %s' % (device, mountpoint) if ret != 0: - raise LmiFailed('Cannot create mount: %s.' % msg) + errname = service.SyncCreateMount.CreateMountValues.value_name(ret) + raise LmiFailed('Cannot create mount: %s: %s.' % ( + msg, errname)) LOG().info('Successfully created mount: %s', msg) |