mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Fix password case lint warning
This commit is contained in:
parent
966d359a9a
commit
a00f418fcf
6
main.py
6
main.py
@ -172,15 +172,15 @@ if __name__ == "__main__":
|
|||||||
f"through your router/firewall if you would like to be able "
|
f"through your router/firewall if you would like to be able "
|
||||||
f"to access Crafty remotely."
|
f"to access Crafty remotely."
|
||||||
)
|
)
|
||||||
password = helper.create_pass()
|
PASSWORD = helper.create_pass()
|
||||||
installer.default_settings(password)
|
installer.default_settings(PASSWORD)
|
||||||
with open(
|
with open(
|
||||||
os.path.join(app_path, "app", "config", "default-creds.txt"),
|
os.path.join(app_path, "app", "config", "default-creds.txt"),
|
||||||
"w",
|
"w",
|
||||||
encoding="utf-8",
|
encoding="utf-8",
|
||||||
) as cred_file:
|
) as cred_file:
|
||||||
cred_file.write(
|
cred_file.write(
|
||||||
json.dumps({"username": "admin", "password": password}, indent=4)
|
json.dumps({"username": "admin", "password": PASSWORD}, indent=4)
|
||||||
)
|
)
|
||||||
os.chmod(os.path.join(app_path, "app", "config", "default-creds.txt"), 0o600)
|
os.chmod(os.path.join(app_path, "app", "config", "default-creds.txt"), 0o600)
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user