From 6867ccc51181e7965445c3d158ddddf9a8fd817e Mon Sep 17 00:00:00 2001 From: ed Date: Wed, 16 Sep 2026 22:38:23 +0000 Subject: [PATCH] fix PRTY_NO_IFADDR + cleanup --- copyparty/th_srv.py | 4 ++-- copyparty/util.py | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/copyparty/th_srv.py b/copyparty/th_srv.py index aa2fd67f7..f228a4a9e 100644 --- a/copyparty/th_srv.py +++ b/copyparty/th_srv.py @@ -201,11 +201,11 @@ try: # reduces glibc RAM usage from 4.7 to 3.5 GiB ...yep, still bonkers os.environ["VIPS_CONCURRENCY"] = "1" - HAVE_VIPS = True import pyvips pyvips.cache_set_max(0) logging.getLogger("pyvips").setLevel(logging.WARNING) + HAVE_VIPS = True except Exception as e: HAVE_VIPS = False if not isinstance(e, ImportError): @@ -219,10 +219,10 @@ try: if PRTY_NO_RAWPY: raise Exception() - HAVE_RAWPY = True import rawpy logging.getLogger("rawpy").setLevel(logging.WARNING) + HAVE_RAWPY = True except: HAVE_RAWPY = False diff --git a/copyparty/util.py b/copyparty/util.py index 62cffdaa1..00f65ace9 100644 --- a/copyparty/util.py +++ b/copyparty/util.py @@ -188,6 +188,7 @@ try: HAVE_IFADDR = True except: HAVE_IFADDR = False + IFADDR_VND = False def get_adapters(include_unconfigured=False): return [] @@ -288,7 +289,6 @@ try: raise Exception() socket.inet_pton(socket.AF_INET6, "::1") - HAVE_IPV6 = True if GRAAL: try: @@ -303,13 +303,15 @@ try: return _inet_pton(fam, ip) socket.inet_pton = inet_pton + + HAVE_IPV6 = True except: + HAVE_IPV6 = False def inet_pton(fam, ip): return socket.inet_aton(ip) socket.inet_pton = inet_pton - HAVE_IPV6 = False try: