mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06:00
cleanup
This commit is contained in:
parent
8fef9e363e
commit
40ce4e2275
|
@ -10,8 +10,7 @@ turn your phone or raspi into a portable file server with resumable uploads/down
|
|||
|
||||
* server only needs `py2.7` or `py3.3+`, all dependencies optional
|
||||
* browse/upload with [IE4](#browser-support) / netscape4.0 on win3.11 (heh)
|
||||
* *resumable* uploads need `firefox 34+` / `chrome 41+` / `safari 7+` for full speed
|
||||
* code standard: `black`
|
||||
* *resumable* uploads need `firefox 34+` / `chrome 41+` / `safari 7+`
|
||||
|
||||
try the **[read-only demo server](https://a.ocv.me/pub/demo/)** 👀 running from a basement in finland
|
||||
|
||||
|
|
|
@ -1498,20 +1498,17 @@ def guess_mime(url: str, fallback: str = "application/octet-stream") -> str:
|
|||
def getalive(pids: list[int], pgid: int) -> list[int]:
|
||||
alive = []
|
||||
for pid in pids:
|
||||
if pgid:
|
||||
try:
|
||||
try:
|
||||
if pgid:
|
||||
# check if still one of ours
|
||||
if os.getpgid(pid) == pgid:
|
||||
alive.append(pid)
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
try:
|
||||
else:
|
||||
# windows doesn't have pgroups; assume
|
||||
psutil.Process(pid)
|
||||
alive.append(pid)
|
||||
except:
|
||||
pass
|
||||
except:
|
||||
pass
|
||||
|
||||
return alive
|
||||
|
||||
|
@ -1551,9 +1548,6 @@ def killtree(root: int) -> None:
|
|||
os.kill(pid, signal.SIGTERM)
|
||||
return
|
||||
|
||||
if not pids:
|
||||
return # yay
|
||||
|
||||
for n in range(10):
|
||||
time.sleep(0.1)
|
||||
pids = getalive(pids, pgid)
|
||||
|
|
Loading…
Reference in a new issue