mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06:00
warn if failed to import pyvips
pyvips uses `ffi.callback()`, which fails on on some systems
This commit is contained in:
parent
1ebe06f51e
commit
899ff69798
|
@ -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"):
|
||||
|
|
Loading…
Reference in a new issue