Python 3.8 fixes.

This commit is contained in:
Antoine Nguyen
2020-09-15 11:14:23 +02:00
parent c3b6ce9b8e
commit 1fa390513d
5 changed files with 31 additions and 12 deletions

View File

@@ -35,9 +35,9 @@ class Postfix(base.Installer):
def install_packages(self):
"""Preconfigure postfix package installation."""
if "centos" in utils.dist_name():
config = configparser.SafeConfigParser()
config = configparser.ConfigParser()
with open("/etc/yum.repos.d/CentOS-Base.repo") as fp:
config.readfp(fp)
config.read_file(fp)
config.set("centosplus", "enabled", "1")
config.set("centosplus", "includepkgs", "postfix-*")
config.set("base", "exclude", "postfix-*")