Fixed dovecot config when openssl 1.1

This commit is contained in:
Antoine Nguyen
2017-06-23 10:58:14 +02:00
parent 8052f4aede
commit 0c6647e9a6
3 changed files with 8 additions and 4 deletions

View File

@@ -53,9 +53,9 @@ class DEBPackage(Package):
"""Get installed package version."""
code, output = utils.exec_cmd(
"dpkg -s {} | grep Version".format(name), capture_output=True)
match = re.match(r"Version: \d:(.+)-\d", output.decode())
match = re.match(r"Version: (\d:)?(.+)-\d", output.decode())
if match:
return match.group(1)
return match.group(2)
return None