diff --git a/copyparty/__main__.py b/copyparty/__main__.py index 8d71c7b7..1f33339b 100644 --- a/copyparty/__main__.py +++ b/copyparty/__main__.py @@ -16,7 +16,7 @@ import argparse from textwrap import dedent from .__init__ import E, WINDOWS, VT100 -from .__version__ import S_VERSION, S_BUILD_DT +from .__version__ import S_VERSION, S_BUILD_DT, CODENAME from .svchub import SvcHub from .util import py_desc @@ -88,8 +88,10 @@ def main(): if WINDOWS: os.system("") # enables colors - f = "\033[36mcopyparty v{} ({})\n python v{}\033[0m\n" - print(f.format(S_VERSION, S_BUILD_DT, py_desc())) + desc = py_desc().replace("[", "\033[1;30m[") + + f = '\033[36mcopyparty v{} "\033[35m{}\033[36m" ({})\n{}\033[0m\n' + print(f.format(S_VERSION, CODENAME, S_BUILD_DT, desc)) ensure_locale() ensure_cert() diff --git a/copyparty/__version__.py b/copyparty/__version__.py index c1d490f0..28bc5499 100644 --- a/copyparty/__version__.py +++ b/copyparty/__version__.py @@ -1,7 +1,8 @@ # coding: utf-8 VERSION = (0, 2, 3) -BUILD_DT = (2020, 4, 27) +CODENAME = "docuparty" +BUILD_DT = (2020, 5, 3) S_VERSION = ".".join(map(str, VERSION)) S_BUILD_DT = "{0:04d}-{1:02d}-{2:02d}".format(*BUILD_DT) diff --git a/copyparty/tcpsrv.py b/copyparty/tcpsrv.py index 9baa0d36..035559fd 100644 --- a/copyparty/tcpsrv.py +++ b/copyparty/tcpsrv.py @@ -108,8 +108,8 @@ class TcpSrv(object): except (OSError, socket.error) as ex: if ex.errno == 13: self.log("tcpsrv", "eaccess {} (trying next)".format(ip)) - elif ex.errno not in [101, 10065]: - raise + elif ex.errno not in [101, 10065, 10051]: + self.log("tcpsrv", "route lookup failed; err {}".format(ex.errno)) s.close() diff --git a/copyparty/util.py b/copyparty/util.py index c1d2b342..54ad6a21 100644 --- a/copyparty/util.py +++ b/copyparty/util.py @@ -505,6 +505,7 @@ def gzip_orig_sz(fn): def py_desc(): + interp = platform.python_implementation() py_ver = ".".join([str(x) for x in sys.version_info]) ofs = py_ver.find(".final.") if ofs > 0: @@ -512,8 +513,14 @@ def py_desc(): bitness = struct.calcsize(b"P") * 8 host_os = platform.system() + compiler = platform.python_compiler() - return "{0} on {1}{2}".format(py_ver, host_os, bitness) + os_ver = re.search(r"([0-9]+\.[0-9\.]+)", platform.version()) + os_ver = os_ver.group(1) if os_ver else "" + + return "{:>9} v{} on {}{} {} [{}]".format( + interp, py_ver, host_os, bitness, os_ver, compiler + ) class Pebkac(Exception):