diff --git a/wo/cli/plugins/site.py b/wo/cli/plugins/site.py index 1399c96..1e18b19 100644 --- a/wo/cli/plugins/site.py +++ b/wo/cli/plugins/site.py @@ -79,8 +79,7 @@ class WOSiteController(CementBaseController): Log.error(self, "service nginx reload failed. " "check issues with `nginx -t` command") else: - Log.error(self, "nginx configuration file does not exist" - .format(wo_domain)) + Log.error(self, "nginx configuration file does not exist") @expose(help="Disable site example.com") def disable(self): @@ -121,8 +120,7 @@ class WOSiteController(CementBaseController): Log.error(self, "service nginx reload failed. " "check issues with `nginx -t` command") else: - Log.error(self, "nginx configuration file does not exist" - .format(wo_domain)) + Log.error(self, "nginx configuration file does not exist") @expose(help="Get example.com information") def info(self): @@ -182,8 +180,7 @@ class WOSiteController(CementBaseController): "disabled")) self.app.render((data), 'siteinfo.mustache') else: - Log.error(self, "nginx configuration file does not exist" - .format(wo_domain)) + Log.error(self, "nginx configuration file does not exist") @expose(help="Monitor example.com logs") def log(self): diff --git a/wo/cli/plugins/site_functions.py b/wo/cli/plugins/site_functions.py index 82eaf71..e51e5f3 100644 --- a/wo/cli/plugins/site_functions.py +++ b/wo/cli/plugins/site_functions.py @@ -1447,8 +1447,7 @@ def setupLetsEncrypt(self, wo_domain_name, subdomain=False, wildcard=False, '/etc/letsencrypt'): Log.info(self, "Securing WordOps backend with {0} certificate" .format(wo_domain_name)) - sslconf = open("/var/www/22222/conf/nginx/ssl.conf" - .format(wo_domain_name), + sslconf = open("/var/www/22222/conf/nginx/ssl.conf", encoding='utf-8', mode='w') sslconf.write("ssl_certificate {0}/{1}/fullchain.pem;\n" "ssl_certificate_key {0}/{1}/key.pem;\n" diff --git a/wo/cli/plugins/stack_pref.py b/wo/cli/plugins/stack_pref.py index 4962537..246a6da 100644 --- a/wo/cli/plugins/stack_pref.py +++ b/wo/cli/plugins/stack_pref.py @@ -73,7 +73,7 @@ def pre_pref(self, apt_packages): log=False) except CommandExecutionError as e: Log.debug(self, "{0}".format(e)) - Log.error("Failed to initialize MySQL package") + Log.error(self, "Failed to initialize MySQL package") Log.debug(self, "echo \"mariadb-server-{0} " "mysql-server/root_password_again "