Fix the warning to read the configuration file.

The method readfp is deprecated and will be removed in future versions.
Use read_file method instead.

Change-Id: I706e73505666e27dc409182db317f05284e6fe85
This commit is contained in:
Daniel Bengtsson 2020-01-16 15:28:22 +01:00
parent 47a3b857cb
commit 4da6e47b8f

View File

@ -59,7 +59,7 @@ def extras(project):
if 'setup.cfg' not in project:
return {}
c = configparser.ConfigParser()
c.readfp(io.StringIO(project['setup.cfg']))
c.read_file(io.StringIO(project['setup.cfg']))
if not c.has_section('extras'):
return {}
return dict(c.items('extras'))