From 4f0612251c7827c8759dc5ccb23bc98a6deb4341 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Fri, 16 Nov 2018 23:59:51 +0100 Subject: [PATCH] fill_config.py: ignore templates starting with 'common_' It's useful to include common parts in numerous cfg files, using the ${include(path)} command. So far they were called common_* and stored outside of the templates dir (e.g. for logging). So far all files in a templates dir are seen as templates, so the common files had to be stored in a different dir, which is a bit senseless. Allow storing them in the same dir with the templates: ignore all files starting with 'common_'. Change-Id: I74446dc0a7f51d4f231e8758a691abb675e87483 --- net/fill_config.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/fill_config.py b/net/fill_config.py index 6aa3829..b84c92a 100755 --- a/net/fill_config.py +++ b/net/fill_config.py @@ -210,6 +210,10 @@ for tmpl_name in sorted(os.listdir(tmpl_dir)): if tmpl_name.startswith('.'): continue + # omit files to be included by other files + if tmpl_name.startswith('common_'): + continue + tmpl_src = os.path.join(tmpl_dir, tmpl_name) dst = tmpl_name