Alon Bar-Lev has uploaded a new change for review. Change subject: node: fixup broken I4b24131 code to properly import modules ......................................................................
node: fixup broken I4b24131 code to properly import modules Change-Id: I2f24d31d001df63f4b8467ef52fb6640af712047 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1128033 Signed-off-by: Alon Bar-Lev <[email protected]> --- M src/plugins/ovirt-host-deploy/node/persist.py 1 file changed, 6 insertions(+), 5 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-host-deploy refs/changes/62/33462/1 diff --git a/src/plugins/ovirt-host-deploy/node/persist.py b/src/plugins/ovirt-host-deploy/node/persist.py index d8748b8..9c38df2 100644 --- a/src/plugins/ovirt-host-deploy/node/persist.py +++ b/src/plugins/ovirt-host-deploy/node/persist.py @@ -55,11 +55,12 @@ from ovirt.node.utils.fs import Config _persist = lambda f: Config().persist(f) except ImportError: - # If it failed, then try importing the legacy code - from ovirtnode import ovirtfunctions - _persist = lambda f: ovirtfunctions.ovirt_store_config(f) - else: - raise RuntimeError("Cannot execute persist task!") + try: + # If it failed, then try importing the legacy code + from ovirtnode import ovirtfunctions + _persist = lambda f: ovirtfunctions.ovirt_store_config(f) + except ImportError: + raise RuntimeError(_('Cannot resolve persist module.')) for f in ( [odeploycons.FileLocations.VDSM_ID_FILE] + -- To view, visit http://gerrit.ovirt.org/33462 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2f24d31d001df63f4b8467ef52fb6640af712047 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-host-deploy Gerrit-Branch: master Gerrit-Owner: Alon Bar-Lev <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
