mirror of
https://github.com/9001/copyparty.git
synced 2026-11-26 16:01:08 +00:00
fix PRTY_NO_IFADDR + cleanup
This commit is contained in:
1 parent
947d73eeb6
commit
6867ccc511
2 files changed
+6
-4
No files matched your search
+2
-2
@@ -201,11 +201,11 @@ try:
|
|||||||
# reduces glibc RAM usage from 4.7 to 3.5 GiB ...yep, still bonkers
|
# reduces glibc RAM usage from 4.7 to 3.5 GiB ...yep, still bonkers
|
||||||
os.environ["VIPS_CONCURRENCY"] = "1"
|
os.environ["VIPS_CONCURRENCY"] = "1"
|
||||||
|
|
||||||
HAVE_VIPS = True
|
|
||||||
import pyvips
|
import pyvips
|
||||||
|
|
||||||
pyvips.cache_set_max(0)
|
pyvips.cache_set_max(0)
|
||||||
logging.getLogger("pyvips").setLevel(logging.WARNING)
|
logging.getLogger("pyvips").setLevel(logging.WARNING)
|
||||||
|
HAVE_VIPS = True
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
HAVE_VIPS = False
|
HAVE_VIPS = False
|
||||||
if not isinstance(e, ImportError):
|
if not isinstance(e, ImportError):
|
||||||
@@ -219,10 +219,10 @@ try:
|
|||||||
if PRTY_NO_RAWPY:
|
if PRTY_NO_RAWPY:
|
||||||
raise Exception()
|
raise Exception()
|
||||||
|
|
||||||
HAVE_RAWPY = True
|
|
||||||
import rawpy
|
import rawpy
|
||||||
|
|
||||||
logging.getLogger("rawpy").setLevel(logging.WARNING)
|
logging.getLogger("rawpy").setLevel(logging.WARNING)
|
||||||
|
HAVE_RAWPY = True
|
||||||
except:
|
except:
|
||||||
HAVE_RAWPY = False
|
HAVE_RAWPY = False
|
||||||
|
|
||||||
|
|||||||
+4
-2
@@ -188,6 +188,7 @@ try:
|
|||||||
HAVE_IFADDR = True
|
HAVE_IFADDR = True
|
||||||
except:
|
except:
|
||||||
HAVE_IFADDR = False
|
HAVE_IFADDR = False
|
||||||
|
IFADDR_VND = False
|
||||||
|
|
||||||
def get_adapters(include_unconfigured=False):
|
def get_adapters(include_unconfigured=False):
|
||||||
return []
|
return []
|
||||||
@@ -288,7 +289,6 @@ try:
|
|||||||
raise Exception()
|
raise Exception()
|
||||||
|
|
||||||
socket.inet_pton(socket.AF_INET6, "::1")
|
socket.inet_pton(socket.AF_INET6, "::1")
|
||||||
HAVE_IPV6 = True
|
|
||||||
|
|
||||||
if GRAAL:
|
if GRAAL:
|
||||||
try:
|
try:
|
||||||
@@ -303,13 +303,15 @@ try:
|
|||||||
return _inet_pton(fam, ip)
|
return _inet_pton(fam, ip)
|
||||||
|
|
||||||
socket.inet_pton = inet_pton
|
socket.inet_pton = inet_pton
|
||||||
|
|
||||||
|
HAVE_IPV6 = True
|
||||||
except:
|
except:
|
||||||
|
HAVE_IPV6 = False
|
||||||
|
|
||||||
def inet_pton(fam, ip):
|
def inet_pton(fam, ip):
|
||||||
return socket.inet_aton(ip)
|
return socket.inet_aton(ip)
|
||||||
|
|
||||||
socket.inet_pton = inet_pton
|
socket.inet_pton = inet_pton
|
||||||
HAVE_IPV6 = False
|
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in new issue
Block a user