From c67ea9f62e9e22a53c0bd936e0c064d38691f364 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Tue, 20 Mar 2018 16:23:35 +0100 Subject: Use iglob() rather than glob() No need to create a list. glob() just does list(iglob()) internally as well. --- kconfiglib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kconfiglib.py') diff --git a/kconfiglib.py b/kconfiglib.py index b0e146d..fc8b308 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -1871,7 +1871,7 @@ class Kconfig(object): # Sort the glob results to ensure a consistent ordering of # Kconfig symbols, which indirectly ensures a consistent # ordering in e.g. .config files - for filename in sorted(glob.glob(pattern)): + for filename in sorted(glob.iglob(pattern)): if self.srctree is not None and not os.path.isabs(filename): # Strip the $srctree prefix from the filename and let # the normal $srctree logic find the file. This makes -- cgit v1.2.3