mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Appease the linter
This commit is contained in:
parent
63d84ed1bb
commit
131337c7d0
@ -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
|
||||
|
6
main.py
6
main.py
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user