Fix utf8 encoding when reading files
This commit is contained in:
@@ -1335,10 +1335,8 @@ def doCleanupAction(self, domain='', webroot='', dbname='', dbuser='',
|
||||
if os.path.isfile('/etc/nginx/sites-available/{0}'
|
||||
.format(domain)):
|
||||
removeNginxConf(self, domain)
|
||||
if (os.path.isdir('/etc/letsencrypt/renewal/{0}_ecc'
|
||||
.format(domain)) or
|
||||
os.path.isdir('/etc/letsencrypt/live/{0}'
|
||||
.format(domain))):
|
||||
if os.path.isdir('/etc/letsencrypt/renewal/{0}_ecc'
|
||||
.format(domain)):
|
||||
removeAcmeConf(self, domain)
|
||||
|
||||
if webroot:
|
||||
@@ -1486,7 +1484,7 @@ def checkWildcardExist(self, wo_domain_name):
|
||||
# define new csv dialect
|
||||
csv.register_dialect('acmeconf', delimiter='|')
|
||||
# open file
|
||||
certfile = open('/var/lib/wo/cert.csv', mode='rt', encoding='utf-8')
|
||||
certfile = open('/var/lib/wo/cert.csv', mode='r', encoding='utf-8')
|
||||
reader = csv.reader(certfile, 'acmeconf')
|
||||
wo_wildcard_domain = ("*.{0}".format(wo_domain_name))
|
||||
for row in reader:
|
||||
|
||||
Reference in New Issue
Block a user