mirror of
https://forgejo.altau.su/lego/lego-monitoring.git
synced 2026-03-09 20:31:10 +00:00
stat consts instead of 0o600
This commit is contained in:
parent
17e1b17a78
commit
8acf7a0e70
1 changed files with 2 additions and 1 deletions
|
|
@ -4,6 +4,7 @@ import asyncio
|
|||
import getpass
|
||||
import json
|
||||
import os
|
||||
import stat
|
||||
|
||||
from common import CREDS_FILE, DEVICE_NAME, HOMESERVER, USER_ID
|
||||
from nio import AsyncClient, LoginResponse
|
||||
|
|
@ -20,7 +21,7 @@ async def main() -> None:
|
|||
await client.close()
|
||||
if isinstance(resp, LoginResponse):
|
||||
open(CREDS_FILE, "w").close()
|
||||
os.chmod(CREDS_FILE, 0o600)
|
||||
os.chmod(CREDS_FILE, stat.S_IRUSR | stat.S_IWUSR)
|
||||
with open(CREDS_FILE, "w") as f:
|
||||
json.dump(
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue