Change in vdsm[master]: Use exception.HookError instead of hooks.HookError

ybronhei at redhat.com ybronhei at redhat.com
Thu Feb 11 13:40:52 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/14/53414/1

diff --git a/vdsm/API.py b/vdsm/API.py
index f5c7806..0bbfa51 100644
--- a/vdsm/API.py
+++ b/vdsm/API.py
@@ -35,6 +35,7 @@
 from vdsm import utils
 from clientIF import clientIF
 from vdsm import constants
+from vdsm import exception
 from vdsm import hooks
 from vdsm import response
 from vdsm import supervdsm
@@ -371,7 +372,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))
 
@@ -601,7 +602,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: ' +
@@ -1506,7 +1507,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/53414
To unsubscribe, visit https://gerrit.ovirt.org/settings

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


More information about the vdsm-patches mailing list