From 349b4d4dfb8ff8cde69110cb298e1e388a2b92fc Mon Sep 17 00:00:00 2001 From: fjosw Date: Thu, 18 Nov 2021 14:40:59 +0000 Subject: [PATCH] Documentation updated --- docs/pyerrors/input/hadrons.html | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/docs/pyerrors/input/hadrons.html b/docs/pyerrors/input/hadrons.html index 68caa58e..4876fb3e 100644 --- a/docs/pyerrors/input/hadrons.html +++ b/docs/pyerrors/input/hadrons.html @@ -87,16 +87,10 @@ def _get_files(path, filestem): - ls = [] - for (dirpath, dirnames, filenames) in os.walk(path): - ls.extend(filenames) - break + ls = os.listdir(path) # Clean up file list - files = [] - for line in ls: - if line.startswith(filestem): - files.append(line) + files = list(filter(lambda x: x.startswith(filestem), ls)) if not files: raise Exception('No files starting with', filestem, 'in folder', path)