py27 compat fixes

This commit is contained in:
Manuel Barkhau 2018-09-05 21:04:26 +02:00
parent 31ae8c21f4
commit 6955728080
3 changed files with 4 additions and 3 deletions

View file

@ -36,7 +36,7 @@ def parse_buffer(cfg_buffer: io.StringIO) -> MaybeConfig:
cfg_parser = configparser.RawConfigParser()
cfg_parser.readfp(cfg_buffer)
if "pycalver" not in cfg_parser:
if not cfg_parser.has_section("pycalver"):
log.error("setup.cfg does not contain a [pycalver] section.")
return None