FIX : more consistent naming for server socket path argument/environment variable

FIX : ruff error about using Path.chmod instead of os.chmod
This commit is contained in:
Timo Schlüßler 2024-02-19 23:08:02 +01:00
parent cded618892
commit ac3e34e22a
2 changed files with 6 additions and 6 deletions

View File

@ -2,8 +2,8 @@
import asyncio
import logging
import os
from signal import SIGINT, SIGTERM
from pathlib import Path
from aiohttp import web
@ -35,7 +35,7 @@ async def main(event):
await site.start()
if conf.SERVER_PATH:
os.chmod(conf.SERVER_PATH, 0o774)
Path.chmod(conf.SERVER_PATH, 0o664)
# Run until we get a shutdown request
await event.wait()

View File

@ -10,10 +10,10 @@ parser.add_argument(
help="host to listen to. Default: `''`. Environment variable: `HOST`",
)
parser.add_argument(
"-U",
"--path",
default=os.environ.get("PATH", ""),
help="unix path to listen to. Default: `''`. Environment variable: `PATH`",
"-S",
"--server-path",
default=os.environ.get("SERVER_PATH", ""),
help="unix path to listen to. Default: `''`. Environment variable: `SERVER_PATH`",
)
parser.add_argument(
"-P",