Nir Soffer has posted comments on this change.
Change subject: Hack to fix vdsm-tool import issues during upgrade
......................................................................
Patch Set 5:
(1 comment)
https://gerrit.ovirt.org/#/c/39408/5/vdsm-tool/vdsm-tool
File vdsm-tool/vdsm-tool:
Line 50: sys.path.pop(0)
Line 51: sys.path.pop(0)
Line 52:
Line 53: ########################################################################
Line 54:
Nice hack, but did you consider using imp?
import imp
lib = os.path.join(os.path.dirname(os.__file__).replace('lib64',
'lib'), 'site-packages')
vdsm = imp.load_module('vdsm', *imp.find_module('vdsm', [lib]))
vdsm.tool = imp.load_module('vdsm.tool', *imp.find_module('tool',
vdsm.__path__))
Line 55: tool_modules = []
Line 56: tool_command = {}
Line 57:
Line 58: ERROR_SAME_COMMAND = """\
--
To view, visit
https://gerrit.ovirt.org/39408
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf3669b06b308399cb78866d72b592ac2d8b1732
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourfali(a)redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-HasComments: Yes