Change in vdsm[ovirt-3.6]: Use exception.HookError instead of hooks.HookError

ybronhei at redhat.com ybronhei at redhat.com
Thu Feb 11 14:02:29 UTC 2016


Yaniv Bronhaim has uploaded a new change for review.

Change subject: Use exception.HookError instead of hooks.HookError
......................................................................

Use exception.HookError instead of hooks.HookError

Following https://gerrit.ovirt.org/#/c/52413

Change-Id: I14bfcade9557b05afdc9c22db4e94d065c2c311d
Signed-off-by: Yaniv Bronhaim <ybronhei at redhat.com>
---
M vdsm/API.py
1 file changed, 4 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/23/53423/1

diff --git a/vdsm/API.py b/vdsm/API.py
index e68c04d..d5f6ced 100644
--- a/vdsm/API.py
+++ b/vdsm/API.py
@@ -38,6 +38,7 @@
 from clientIF import clientIF
 from vdsm import netinfo
 from vdsm import constants
+from vdsm import exception
 from vdsm import response
 import storage.misc
 import storage.clusterlock
@@ -375,7 +376,7 @@
         if runHooks:
             try:
                 hooks.before_get_vm_stats()
-            except hooks.HookError as e:
+            except exception.HookError as e:
                 return response.error('hookError',
                                       'Hook error: ' + str(e))
 
@@ -591,7 +592,7 @@
         try:
             if not v.waitForMigrationDestinationPrepare():
                 return errCode['createErr']
-        except hooks.HookError as e:
+        except exception.HookError as e:
             self.log.debug('Destination VM creation failed due to hook' +
                            ' error:' + str(e))
             return response.error('hookError', 'Destination hook failed: ' +
@@ -1495,7 +1496,7 @@
             if rollbackCtx['status'] != doneCode:
                 _after_network_setup_fail(networks, bondings, options)
             return rollbackCtx
-        except hooks.HookError as e:
+        except exception.HookError as e:
             _after_network_setup_fail(networks, bondings, options)
             return response.error('hookError', 'Hook error: ' + str(e))
         except:


-- 
To view, visit https://gerrit.ovirt.org/53423
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I14bfcade9557b05afdc9c22db4e94d065c2c311d
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.6
Gerrit-Owner: Yaniv Bronhaim <ybronhei at redhat.com>


More information about the vdsm-patches mailing list