Alon Bar-Lev has uploaded a new change for review. Change subject: core: config: clenaup: use glob instead of listdir ......................................................................
core: config: clenaup: use glob instead of listdir Change-Id: Ia11f738e1b58d717e91b84483b1a96cb0bbc94e8 Signed-off-by: Alon Bar-Lev <alo...@redhat.com> --- M src/plugins/otopi/core/config.py 1 file changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.ovirt.org:29418/otopi refs/changes/43/13143/1 diff --git a/src/plugins/otopi/core/config.py b/src/plugins/otopi/core/config.py index 45827db..1231b28 100644 --- a/src/plugins/otopi/core/config.py +++ b/src/plugins/otopi/core/config.py @@ -23,6 +23,7 @@ import os import configparser +import glob import gettext _ = lambda m: gettext.dgettext(message=m, domain='otopi') @@ -112,12 +113,11 @@ configDir = '%s.d' % configFile if os.path.exists(configFile): configs.append(configFile) - if os.path.isdir(configDir): - configs += [ - os.path.join(configDir, f) - for f in sorted(os.listdir(configDir)) - if f.endswith('.conf') - ] + configs += sorted( + glob.glob( + os.path.join(configDir, '*.conf') + ) + ) self._configFiles = self._config.read(configs) -- To view, visit http://gerrit.ovirt.org/13143 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia11f738e1b58d717e91b84483b1a96cb0bbc94e8 Gerrit-PatchSet: 1 Gerrit-Project: otopi Gerrit-Branch: master Gerrit-Owner: Alon Bar-Lev <alo...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches