fix PRTY_NO_IFADDR + cleanup

This commit is contained in:
ed
2026-09-16 22:38:23 +00:00
parent 947d73eeb6
commit 6867ccc511
2 changed files with 6 additions and 4 deletions
+2 -2
View File
@@ -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
+4 -2
View File
@@ -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: