Commit f4c31e58 authored by Michael Büsch's avatar Michael Büsch

Avoid usage of deprecated readfp()

Signed-off-by: Michael Büsch's avatarMichael Buesch <m@bues.ch>
parent 2382d445
......@@ -94,7 +94,11 @@ class PbConf(object):
return fallback
try:
p = _ConfigParser()
p.readfp(StringIO(text), filename)
textIO = StringIO(text)
if hasattr(p, "read_file"):
p.read_file(textIO, filename)
else:
p.readfp(textIO, filename)
# [PROFIBUS]
self.debug = getint("PROFIBUS", "debug",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment