diff --git a/client-api/api_lib/pvcapi_helper.py b/client-api/api_lib/pvcapi_helper.py index 1292c2d0..6e879bc3 100755 --- a/client-api/api_lib/pvcapi_helper.py +++ b/client-api/api_lib/pvcapi_helper.py @@ -358,17 +358,11 @@ def vm_console(vm, lines=None): pvc_common.stopZKConnection(zk_conn) if retflag: - if retdata: - retcode = 200 - retdata = { - 'name': vm, - 'data': retdata - } - else: - retcode = 404 - retdata = { - 'message': 'VM not found.' - } + retcode = 200 + retdata = { + 'name': vm, + 'data': retdata + } else: retcode = 400 retdata = {