Change in vdsm[master]: configurator doesn't load pyc files under configurators folder

nsoffer at redhat.com nsoffer at redhat.com
Thu Sep 10 11:27:51 UTC 2015


Nir Soffer has posted comments on this change.

Change subject: configurator doesn't load pyc files under configurators folder
......................................................................


Patch Set 6:

(1 comment)

https://gerrit.ovirt.org/#/c/45846/6/lib/vdsm/tool/configurator.py
File lib/vdsm/tool/configurator.py:

Line 60:     )
Line 61: 
Line 62: 
Line 63: _CONFIGURATORS = {}
Line 64: configurators_path = os.path.join(os.path.abspath(configurators.__path__[0]))
> this should be a _PRIVATE_CONSTANT, no?
We are using os.listdir now, so os.path.join and os.path.abspath are not needed, just remove them and use:

     _listmodules(configurators.__path__[0])
Line 65: for module in _listmodules(configurators_path):
Line 66:     _CONFIGURATORS[module] = _import_module(configurators, module)
Line 67:     if not hasattr(_CONFIGURATORS[module], 'name'):
Line 68:         setattr(_CONFIGURATORS[module], 'name', module)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia529de0069e2f4ec168a4b9df82ba62c56d66730
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourfali at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list