Appease the linter

This commit is contained in:
amcmanu3 2023-11-13 18:16:08 -05:00
parent 63d84ed1bb
commit 131337c7d0
2 changed files with 7 additions and 5 deletions

View File

@ -394,7 +394,7 @@ class Helpers:
# set of characters, we fill the rest of
# the password length by selecting randomly from the combined
# list of character above.
for x in range(max_len - 4):
for char in range(max_len - 4):
temp_pass = temp_pass + random.choice(combo)
# convert temporary password into array and shuffle to
@ -406,8 +406,8 @@ class Helpers:
# traverse the temporary password array and append the chars
# to form the password
password = ""
for x in temp_pass_list:
password = password + x
for char in temp_pass_list:
password = password + char
# print out password
return password

View File

@ -170,8 +170,10 @@ if __name__ == "__main__":
os.path.join(app_path, "app", "config", "default-creds.txt"),
"w",
encoding="utf-8",
) as f:
f.write(json.dumps({"username": "admin", "password": password}, indent=4))
) as cred_file:
cred_file.write(
json.dumps({"username": "admin", "password": password}, indent=4)
)
os.chmod(os.path.join(app_path, "app", "config", "default-creds.txt"), 0o600)
else:
Console.debug("Existing install detected")