mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 17:12:13 -06:00
misc cleanup
This commit is contained in:
parent
5c30148be4
commit
0cef062084
4
.vscode/launch.py
vendored
4
.vscode/launch.py
vendored
|
@ -11,15 +11,15 @@ import sys
|
||||||
|
|
||||||
print(sys.executable)
|
print(sys.executable)
|
||||||
|
|
||||||
|
import json5
|
||||||
import shlex
|
import shlex
|
||||||
import jstyleson
|
|
||||||
import subprocess as sp
|
import subprocess as sp
|
||||||
|
|
||||||
|
|
||||||
with open(".vscode/launch.json", "r", encoding="utf-8") as f:
|
with open(".vscode/launch.json", "r", encoding="utf-8") as f:
|
||||||
tj = f.read()
|
tj = f.read()
|
||||||
|
|
||||||
oj = jstyleson.loads(tj)
|
oj = json5.loads(tj)
|
||||||
argv = oj["configurations"][0]["args"]
|
argv = oj["configurations"][0]["args"]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -51,8 +51,7 @@ except ImportError:
|
||||||
PY2 = sys.version_info < (3,)
|
PY2 = sys.version_info < (3,)
|
||||||
if PY2:
|
if PY2:
|
||||||
from Queue import Queue
|
from Queue import Queue
|
||||||
from urllib import unquote
|
from urllib import quote, unquote
|
||||||
from urllib import quote
|
|
||||||
|
|
||||||
sys.dont_write_bytecode = True
|
sys.dont_write_bytecode = True
|
||||||
bytes = str
|
bytes = str
|
||||||
|
|
|
@ -12,7 +12,7 @@ except:
|
||||||
TYPE_CHECKING = False
|
TYPE_CHECKING = False
|
||||||
|
|
||||||
if True:
|
if True:
|
||||||
from typing import Any, Union, Callable
|
from typing import Any, Callable, Union
|
||||||
|
|
||||||
PY2 = sys.version_info < (3,)
|
PY2 = sys.version_info < (3,)
|
||||||
if not PY2:
|
if not PY2:
|
||||||
|
|
|
@ -458,7 +458,7 @@ class NetMap(object):
|
||||||
fam = socket.AF_INET6 if v6 else socket.AF_INET
|
fam = socket.AF_INET6 if v6 else socket.AF_INET
|
||||||
bip = socket.inet_pton(fam, ip.split("/")[0])
|
bip = socket.inet_pton(fam, ip.split("/")[0])
|
||||||
self.bip.append(bip)
|
self.bip.append(bip)
|
||||||
self.b2sip[bip] = ip.split('/')[0]
|
self.b2sip[bip] = ip.split("/")[0]
|
||||||
self.b2net[bip] = (IPv6Network if v6 else IPv4Network)(ip, False)
|
self.b2net[bip] = (IPv6Network if v6 else IPv4Network)(ip, False)
|
||||||
|
|
||||||
self.bip.sort(reverse=True)
|
self.bip.sort(reverse=True)
|
||||||
|
|
|
@ -152,7 +152,7 @@
|
||||||
partyfuse.py{% if accs %} -a <b>{{ pw }}</b>{% endif %} http{{ s }}://{{ ep }}/{{ vp }} <b><span class="os win">W:</span><span class="os lin mac">mp</span></b>
|
partyfuse.py{% if accs %} -a <b>{{ pw }}</b>{% endif %} http{{ s }}://{{ ep }}/{{ vp }} <b><span class="os win">W:</span><span class="os lin mac">mp</span></b>
|
||||||
</pre>
|
</pre>
|
||||||
{% if s %}
|
{% if s %}
|
||||||
<p><em>note: if you are on LAN (or just dont have valid certificates), add <code>-td</code></p>
|
<p><em>note: if you are on LAN (or just dont have valid certificates), add <code>-td</code></em></p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<p>
|
<p>
|
||||||
you can use <a href="/.cpr/a/up2k.py">up2k.py</a> to upload (sometimes faster than web-browsers)
|
you can use <a href="/.cpr/a/up2k.py">up2k.py</a> to upload (sometimes faster than web-browsers)
|
||||||
|
|
Loading…
Reference in a new issue