mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Fix colorspace compatibility check (#5334)
* update compatibility_check * update doc-string
This commit is contained in:
parent
a87fdd5173
commit
afbd3d392d
1 changed files with 10 additions and 3 deletions
|
|
@ -237,10 +237,17 @@ def get_data_subprocess(config_path, data_type):
|
|||
|
||||
|
||||
def compatibility_check():
|
||||
"""Making sure PyOpenColorIO is importable"""
|
||||
"""checking if user has a compatible PyOpenColorIO >= 2.
|
||||
|
||||
It's achieved by checking if PyOpenColorIO is importable
|
||||
and calling any version 2 specific function
|
||||
"""
|
||||
try:
|
||||
import PyOpenColorIO # noqa: F401
|
||||
except ImportError:
|
||||
import PyOpenColorIO
|
||||
|
||||
# ocio versions lower than 2 will raise AttributeError
|
||||
PyOpenColorIO.GetVersion()
|
||||
except (ImportError, AttributeError):
|
||||
return False
|
||||
return True
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue