Set proper output

This commit is contained in:
VirtuBox
2019-09-23 18:32:38 +02:00
parent 782cb2e440
commit b9c0850c9a

View File

@@ -11,6 +11,7 @@ from subprocess import CalledProcessError
from wo.cli.plugins.sitedb import getSiteInfo from wo.cli.plugins.sitedb import getSiteInfo
from wo.cli.plugins.stack import WOStackController from wo.cli.plugins.stack import WOStackController
from wo.cli.plugins.stack_pref import post_pref from wo.cli.plugins.stack_pref import post_pref
from wo.core.acme import WOAcme
from wo.core.aptget import WOAptGet from wo.core.aptget import WOAptGet
from wo.core.fileutils import WOFileUtils from wo.core.fileutils import WOFileUtils
from wo.core.git import WOGit from wo.core.git import WOGit
@@ -20,7 +21,6 @@ from wo.core.services import WOService
from wo.core.shellexec import CommandExecutionError, WOShellExec from wo.core.shellexec import CommandExecutionError, WOShellExec
from wo.core.sslutils import SSL from wo.core.sslutils import SSL
from wo.core.variables import WOVariables from wo.core.variables import WOVariables
from wo.core.acme import WOAcme
class SiteError(Exception): class SiteError(Exception):
@@ -39,8 +39,8 @@ def pre_run_checks(self):
Log.wait(self, "Running pre-update checks") Log.wait(self, "Running pre-update checks")
try: try:
Log.debug(self, "checking NGINX configuration ...") Log.debug(self, "checking NGINX configuration ...")
FNULL = open('/dev/null', 'w') fnull = open('/dev/null', 'w')
subprocess.check_call(["/usr/sbin/nginx", "-t"], stdout=FNULL, subprocess.check_call(["/usr/sbin/nginx", "-t"], stdout=fnull,
stderr=subprocess.STDOUT) stderr=subprocess.STDOUT)
except CalledProcessError as e: except CalledProcessError as e:
Log.failed(self, "Running pre-update checks") Log.failed(self, "Running pre-update checks")