Fix an issue where postgresql-9.4 was being detected as installed whereas it was in fact not

This commit is contained in:
Alexandre Aubin 2019-01-26 19:43:40 +01:00
parent 270bfb54cd
commit 969577b4c2

View file

@ -38,6 +38,6 @@ class MyMigration(Migration):
def package_is_installed(self, package_name):
p = subprocess.Popen("dpkg --list | grep -q -w {}".format(package_name), shell=True)
p = subprocess.Popen("dpkg --list | grep '^ii ' | grep -q -w {}".format(package_name), shell=True)
p.communicate()
return p.returncode == 0