mirror of
https://github.com/9001/copyparty.git
synced 2026-03-18 22:22:58 +10:00
warn if failed to import pyvips
pyvips uses `ffi.callback()`, which fails on on some systems
This commit is contained in:
@@ -113,14 +113,17 @@ except:
|
||||
|
||||
try:
|
||||
if os.environ.get("PRTY_NO_VIPS"):
|
||||
raise Exception()
|
||||
raise ImportError()
|
||||
|
||||
HAVE_VIPS = True
|
||||
import pyvips
|
||||
|
||||
logging.getLogger("pyvips").setLevel(logging.WARNING)
|
||||
except:
|
||||
except Exception as e:
|
||||
HAVE_VIPS = False
|
||||
if not isinstance(e, ImportError):
|
||||
logging.warning("libvips found, but failed to load: " + str(e))
|
||||
|
||||
|
||||
try:
|
||||
if os.environ.get("PRTY_NO_RAW"):
|
||||
|
||||
Reference in New Issue
Block a user