Compare commits

..

No commits in common. "be1bc22538f5fab6d47b859fc83a68cf0c83bda6" and "259f5859686e7d6d4773d4d8e9db020cceb497d3" have entirely different histories.

10 changed files with 1 additions and 11 deletions

View File

@ -98,7 +98,6 @@ def _main():
return 0 return 0
def _confdir(args): def _confdir(args):
if args["-c"]: if args["-c"]:
# Custom config directory # Custom config directory

View File

@ -82,7 +82,6 @@ async def control(req, ws):
await asend(ws, StatusMsg(status="ack", req=cmd)) await asend(ws, StatusMsg(status="ack", req=cmd))
@bp.websocket("watch") @bp.websocket("watch")
@websocket_wrapper @websocket_wrapper
async def watch(req, ws): async def watch(req, ws):

View File

@ -39,14 +39,12 @@ async def main_start(app, loop):
app.ctx.threadexec = ThreadPoolExecutor(max_workers=8) app.ctx.threadexec = ThreadPoolExecutor(max_workers=8)
@app.after_server_stop @app.after_server_stop
async def main_stop(app, loop): async def main_stop(app, loop):
await watching.stop(app, loop) await watching.stop(app, loop)
app.ctx.threadexec.shutdown() app.ctx.threadexec.shutdown()
@app.on_request @app.on_request
async def use_session(req): async def use_session(req):
req.ctx.session = session.get(req) req.ctx.session = session.get(req)

View File

@ -74,7 +74,6 @@ def verify(request, *, privileged=False):
raise Unauthorized("Login required", "cookie") raise Unauthorized("Login required", "cookie")
bp = Blueprint("auth") bp = Blueprint("auth")

View File

@ -24,7 +24,6 @@ class User(msgspec.Struct, omit_defaults=True):
lastSeen: int = 0 # noqa: N815 lastSeen: int = 0 # noqa: N815
class Link(msgspec.Struct, omit_defaults=True): class Link(msgspec.Struct, omit_defaults=True):
location: str location: str
creator: str = "" creator: str = ""

View File

@ -25,7 +25,6 @@ class MkDir(ControlBase):
path.mkdir(parents=True, exist_ok=False) path.mkdir(parents=True, exist_ok=False)
class Rename(ControlBase): class Rename(ControlBase):
path: str path: str
to: str to: str
@ -51,7 +50,6 @@ class Rm(ControlBase):
p.unlink() p.unlink()
class Mv(ControlBase): class Mv(ControlBase):
sel: list[str] sel: list[str]
dst: str dst: str

View File

@ -36,7 +36,6 @@ def run(*, dev=False):
Sanic.serve_single() Sanic.serve_single()
def check_cert(certdir, domain): def check_cert(certdir, domain):
if (certdir / "privkey.pem").exist() and (certdir / "fullchain.pem").exists(): if (certdir / "privkey.pem").exist() and (certdir / "fullchain.pem").exists():
return return

View File

@ -221,7 +221,6 @@ async def broadcast(msg):
logging.exception("Broadcast error") logging.exception("Broadcast error")
async def start(app, loop): async def start(app, loop):
config.load_config() config.load_config()
app.ctx.watcher = threading.Thread( app.ctx.watcher = threading.Thread(

View File

@ -27,7 +27,6 @@ dependencies = [
"stream-zip", "stream-zip",
"tomli_w", "tomli_w",
] ]
requires-python = ">=3.10"
[project.urls] [project.urls]
Homepage = "" Homepage = ""

View File

@ -2,6 +2,7 @@ import tempfile
from pathlib import Path from pathlib import Path
import pytest import pytest
from cista import config from cista import config
from cista.protocol import Cp, MkDir, Mv, Rename, Rm from cista.protocol import Cp, MkDir, Mv, Rename, Rm