From d618cff691b83b5a2d39d709838d07a7fdaac151 Mon Sep 17 00:00:00 2001 From: Mark Sterin Date: Fri, 28 Oct 2016 17:29:27 -0700 Subject: [PATCH] Now getVmdk returns correct JSON error, and prints more info (#661) --- esx_service/vmdk_ops.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/esx_service/vmdk_ops.py b/esx_service/vmdk_ops.py index e78325886..45e9ad934 100755 --- a/esx_service/vmdk_ops.py +++ b/esx_service/vmdk_ops.py @@ -408,10 +408,10 @@ def getVMDK(vmdk_path, vol_name, datastore): result = vol_info(kv.getAll(vmdk_path), kv.get_vol_info(vmdk_path), datastore) - except: - msg = "Failed to get disk details for %s" % vmdk_path + except Exception as ex: + msg = "Failed to get disk details for %s (%s)" % (vmdk_path, ex) logging.error(msg) - result = msg + result = err(msg) return result def listVMDK(vm_datastore, tenant):