diff --git a/templatehelper.py b/templatehelper.py index c8e0fcc..c2c4260 100644 --- a/templatehelper.py +++ b/templatehelper.py @@ -72,18 +72,18 @@ def listdir(path): """ ignorelist = ['index', 'index.md', '*.scmsfasicon', '*.scmstarget'] if os.path.exists(os.path.join(PATHPREFIX, path, '.scmsignore')): - with open(os.path.join(PATHPREFIX, path, '.scmsignore'), encoding='utf-8') as file: - ignorelist.extend([line.strip('\n') for line in file.readlines()]) + with open(os.path.join(PATHPREFIX, path, '.scmsignore'), encoding='utf-8') as scsmignore: + ignorelist.extend([line.strip('\n') for line in scsmignore.readlines()]) dirlist = [ os.path.basename(f) for f in os.listdir(os.path.join(PATHPREFIX, path)) if regex.match('^(?!\\.).*(?