configfile: Fix the exception raised when an included file is missing (#1931)
Signed-off-by: Julien Lirochon <julien@lirochon.net>
This commit is contained in:
parent
05edd556c3
commit
12feb6d7fb
|
@ -164,7 +164,7 @@ class PrinterConfig:
|
||||||
include_filenames = glob.glob(include_glob)
|
include_filenames = glob.glob(include_glob)
|
||||||
if not include_filenames and not glob.has_magic(include_glob):
|
if not include_filenames and not glob.has_magic(include_glob):
|
||||||
# Empty set is OK if wildcard but not for direct file reference
|
# Empty set is OK if wildcard but not for direct file reference
|
||||||
raise error("Include file '%s' does not exist", include_glob)
|
raise error("Include file '%s' does not exist" % (include_glob,))
|
||||||
include_filenames.sort()
|
include_filenames.sort()
|
||||||
for include_filename in include_filenames:
|
for include_filename in include_filenames:
|
||||||
include_data = self._read_config_file(include_filename)
|
include_data = self._read_config_file(include_filename)
|
||||||
|
|
Loading…
Reference in New Issue