configfile: Improve support for python3.12
It seems python3.12 has removed support for readfp() - use read_file() instead. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
3c8f202dfa
commit
187cc2f1b8
|
@ -217,6 +217,9 @@ class PrinterConfig:
|
|||
data = '\n'.join(buffer)
|
||||
del buffer[:]
|
||||
sbuffer = io.StringIO(data)
|
||||
if sys.version_info.major >= 3:
|
||||
fileconfig.read_file(sbuffer, filename)
|
||||
else:
|
||||
fileconfig.readfp(sbuffer, filename)
|
||||
def _resolve_include(self, source_filename, include_spec, fileconfig,
|
||||
visited):
|
||||
|
|
Loading…
Reference in New Issue