fix linter in postgresql migration

This commit is contained in:
Kay0u 2022-08-13 22:28:27 +02:00
parent 7a928ba5ad
commit 3cb1a41aa8
No known key found for this signature in database
GPG key ID: AE1DCADB6415A156

View file

@ -1,5 +1,6 @@
import subprocess
import time
import os
from moulinette import m18n
from yunohost.utils.error import YunohostError, YunohostValidationError
@ -19,7 +20,7 @@ class MyMigration(Migration):
def run(self):
if os.system('grep -A10 "ynh-deps" /var/lib/dpkg/status | grep "Package:\|Depends:" | grep -B1 postgresql') != 0:
if os.system('grep -A10 "ynh-deps" /var/lib/dpkg/status | grep -E "Package:|Depends:" | grep -B1 postgresql') != 0:
logger.info("No YunoHost app seem to require postgresql... Skipping!")
return