mirror of
https://github.com/bsedin/matrix-webhook.git
synced 2026-04-09 11:25: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 asyncio
|
||||||
import logging
|
import logging
|
||||||
import os
|
|
||||||
from signal import SIGINT, SIGTERM
|
from signal import SIGINT, SIGTERM
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
from aiohttp import web
|
from aiohttp import web
|
||||||
|
|
||||||
@@ -35,7 +35,7 @@ async def main(event):
|
|||||||
await site.start()
|
await site.start()
|
||||||
|
|
||||||
if conf.SERVER_PATH:
|
if conf.SERVER_PATH:
|
||||||
os.chmod(conf.SERVER_PATH, 0o774)
|
Path.chmod(conf.SERVER_PATH, 0o664)
|
||||||
|
|
||||||
# Run until we get a shutdown request
|
# Run until we get a shutdown request
|
||||||
await event.wait()
|
await event.wait()
|
||||||
|
|||||||
@@ -10,10 +10,10 @@ parser.add_argument(
|
|||||||
help="host to listen to. Default: `''`. Environment variable: `HOST`",
|
help="host to listen to. Default: `''`. Environment variable: `HOST`",
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-U",
|
"-S",
|
||||||
"--path",
|
"--server-path",
|
||||||
default=os.environ.get("PATH", ""),
|
default=os.environ.get("SERVER_PATH", ""),
|
||||||
help="unix path to listen to. Default: `''`. Environment variable: `PATH`",
|
help="unix path to listen to. Default: `''`. Environment variable: `SERVER_PATH`",
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-P",
|
"-P",
|
||||||
|
|||||||
Reference in New Issue
Block a user