mirror of
https://github.com/bsedin/matrix-webhook.git
synced 2026-04-09 03:15:40 +00:00
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:
@@ -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()
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user