Change in vdsm[master]: vdsm-tool: handle error during module loading
zhshzhou at linux.vnet.ibm.com
zhshzhou at linux.vnet.ibm.com
Tue Jan 21 03:02:32 UTC 2014
Zhou Zheng Sheng has posted comments on this change.
Change subject: vdsm-tool: handle error during module loading
......................................................................
Patch Set 1:
(1 comment)
http://gerrit.ovirt.org/#/c/23456/1/vdsm-tool/vdsm-tool
File vdsm-tool/vdsm-tool:
Line 76: mod_fobj, mod_absp, mod_desc = imp.find_module(mod_name, [mod_path])
Line 77: try:
Line 78: module = imp.load_module(package_name + '.' + mod_name, mod_fobj,
Line 79: mod_absp, mod_desc)
Line 80: except (TypeError, IndexError, ValueError, AssertionError):
Since a module can execute Python statements during the loading, it's possible to raise all types of exceptions. If we want to skip the broken modules, I suggest we "except Exception".
Line 81: # py module is corrupted by wrong imports. move on and ignore it
Line 82: syslog.syslog("module %s could not load to vdsm-tool: %s" %
Line 83: (mod_name, traceback.format_exc()))
Line 84: continue
--
To view, visit http://gerrit.ovirt.org/23456
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I023ad390723617d10664f9bf5b8d1460131efef2
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Zhou Zheng Sheng <zhshzhou at linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list