Fix passwd variable

This commit is contained in:
VirtuBox
2019-08-05 13:05:56 +02:00
parent f2abaeb5da
commit 436130ee8d
3 changed files with 3 additions and 7 deletions

View File

@@ -412,7 +412,7 @@ def post_pref(self, apt_packages, packages):
out=wo_nginx)
wo_nginx.close()
randompass = ''.join([random.choice
passwd = ''.join([random.choice
(string.ascii_letters + string.digits)
for n in range(24)])
try:
@@ -421,7 +421,7 @@ def post_pref(self, apt_packages, packages):
"{password} 2> /dev/null)\n\""
"> /etc/nginx/htpasswd-wo "
"2>/dev/null"
.format(password=randompass))
.format(password=passwd))
except CommandExecutionError as e:
Log.debug(self, "{0}".format(e))
Log.error(self, "Failed to save HTTP Auth")