From 35f8d5f988f0bae111c41d0e67f97dcffc8accce Mon Sep 17 00:00:00 2001 From: Thomas SUCHON Date: Thu, 23 May 2024 14:27:30 +0200 Subject: [PATCH 1/3] Log less data --- install | 1 - wo/core/acme.py | 8 +++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/install b/install index ec5eb49..06a3274 100755 --- a/install +++ b/install @@ -903,7 +903,6 @@ else echo wo_lib_echo "WordOps Documentation : https://docs.wordops.net" wo_lib_echo "WordOps Community Forum : https://community.wordops.net" - wo_lib_echo "WordOps Community Chat : https://chat.wordops.net" echo wo_lib_echo "Give WordOps a GitHub star : https://github.com/WordOps/WordOps/" echo diff --git a/wo/core/acme.py b/wo/core/acme.py index a49d2ba..7440703 100644 --- a/wo/core/acme.py +++ b/wo/core/acme.py @@ -1,8 +1,6 @@ import csv import os -import requests - from wo.core.fileutils import WOFileUtils from wo.core.git import WOGit from wo.core.logging import Log @@ -55,7 +53,7 @@ class WOAcme: WOAcme.check_acme(self) acme_list = WOShellExec.cmd_exec_stdout( self, "{0} ".format(WOAcme.wo_acme_exec) + - "--list --listraw") + "--list --listraw", log=False) if acme_list: WOFileUtils.textwrite(self, '/var/lib/wo/cert.csv', acme_list) WOFileUtils.chmod(self, '/var/lib/wo/cert.csv', 0o600) @@ -94,7 +92,7 @@ class WOAcme: if not WOShellExec.cmd_exec( self, "{0} ".format(WOAcme.wo_acme_exec) + "--issue -d '{0}' {1} -k {2} -f" - .format(all_domains, acme_mode, keylenght)): + .format(all_domains, acme_mode, keylenght), log=False): Log.failed(self, "Issuing SSL cert with acme.sh") if acmedata['dns'] is True: Log.error( @@ -174,7 +172,7 @@ class WOAcme: try: WOShellExec.cmd_exec( self, "{0} ".format(WOAcme.wo_acme_exec) + - "--renew -d {0} --ecc --force".format(domain)) + "--renew -d {0} --ecc --force".format(domain), log=False) except CommandExecutionError as e: Log.debug(self, str(e)) Log.error(self, 'Unable to renew certificate') From ae41db1111b0c48ee2857038b5df1d9b0a29371c Mon Sep 17 00:00:00 2001 From: Thomas SUCHON Date: Thu, 23 May 2024 15:30:05 +0200 Subject: [PATCH 2/3] Fix backend address display in Nginx install --- wo/cli/plugins/stack_pref.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wo/cli/plugins/stack_pref.py b/wo/cli/plugins/stack_pref.py index 9199307..b56bda1 100644 --- a/wo/cli/plugins/stack_pref.py +++ b/wo/cli/plugins/stack_pref.py @@ -419,7 +419,7 @@ def post_pref(self, apt_packages, packages, upgrade=False): ["HTTP Auth Password : {0}" .format(passwd)]) self.msg = (self.msg + [f'WordOps backend is available on https://{server_ip}:22222]) ' - 'or https://{WOVar.wo_fqdn}:22222']) + f'or https://{WOVar.wo_fqdn}:22222']) data = dict(release=WOVar.wo_version) WOTemplate.deploy(self, '/opt/cf-update.sh', @@ -646,7 +646,8 @@ def post_pref(self, apt_packages, packages, upgrade=False): .format(php_version[0])): WOGit.rollback(self, ["/etc/php"], msg="Rollback PHP") else: - Log.valide(self, "Configuring php{0}-fpm".format(php_version[0])) + Log.valide( + self, "Configuring php{0}-fpm".format(php_version[0])) WOGit.add(self, ["/etc/php"], msg="Adding PHP into Git") if os.path.exists('/etc/nginx/conf.d/upstream.conf'): From f533438f8d0bd53b2d9162d26c08532667a4a022 Mon Sep 17 00:00:00 2001 From: Thomas SUCHON Date: Thu, 23 May 2024 16:09:37 +0200 Subject: [PATCH 3/3] Cleanup unused library --- setup.cfg | 4 ++-- wo/cli/plugins/stack_pref.py | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/setup.cfg b/setup.cfg index 7d616e1..d71d161 100644 --- a/setup.cfg +++ b/setup.cfg @@ -15,7 +15,7 @@ where=tests/ license-file = LICENSE [flake8] -ignore = F405,W504,S322,S404,S603,s607,s602,C901 +ignore = F405,W504,S322,S404,S603,s607,s602,C901,W503 max-line-length = 120 exclude = # No need to traverse our git directory @@ -26,4 +26,4 @@ exclude = build, # This contains builds of flake8 that we don't want to check dist -max-complexity = 10 \ No newline at end of file +max-complexity = 10 diff --git a/wo/cli/plugins/stack_pref.py b/wo/cli/plugins/stack_pref.py index b56bda1..1239a73 100644 --- a/wo/cli/plugins/stack_pref.py +++ b/wo/cli/plugins/stack_pref.py @@ -5,7 +5,6 @@ import shutil import string import psutil -import requests from wo.core.apt_repo import WORepo from wo.core.aptget import WOAptGet from wo.core.cron import WOCron