misc cleanup

This commit is contained in:
ed 2022-12-01 21:44:31 +00:00
parent 5c30148be4
commit 0cef062084
5 changed files with 6 additions and 7 deletions

4
.vscode/launch.py vendored
View file

@ -11,15 +11,15 @@ import sys
print(sys.executable)
import json5
import shlex
import jstyleson
import subprocess as sp
with open(".vscode/launch.json", "r", encoding="utf-8") as f:
tj = f.read()
oj = jstyleson.loads(tj)
oj = json5.loads(tj)
argv = oj["configurations"][0]["args"]
try:

View file

@ -51,8 +51,7 @@ except ImportError:
PY2 = sys.version_info < (3,)
if PY2:
from Queue import Queue
from urllib import unquote
from urllib import quote
from urllib import quote, unquote
sys.dont_write_bytecode = True
bytes = str

View file

@ -12,7 +12,7 @@ except:
TYPE_CHECKING = False
if True:
from typing import Any, Union, Callable
from typing import Any, Callable, Union
PY2 = sys.version_info < (3,)
if not PY2:

View file

@ -458,7 +458,7 @@ class NetMap(object):
fam = socket.AF_INET6 if v6 else socket.AF_INET
bip = socket.inet_pton(fam, ip.split("/")[0])
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.bip.sort(reverse=True)

View file

@ -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>
</pre>
{% 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 %}
<p>
you can use <a href="/.cpr/a/up2k.py">up2k.py</a> to upload (sometimes faster than web-browsers)