♻️ skip non-existent local path

when finding  local version, stop crashing if directory to search doesn't exist - this will allow to just use build version
This commit is contained in:
Ondřej Samohel 2022-08-02 11:26:33 +02:00
parent de70521f56
commit 3d7e195307
No known key found for this signature in database
GPG key ID: 02376E18990A97C6

View file

@ -514,10 +514,10 @@ class OpenPypeVersion(semver.VersionInfo):
ValueError: if invalid path is specified.
"""
if not openpype_dir.exists() and not openpype_dir.is_dir():
raise ValueError("specified directory is invalid")
_openpype_versions = []
if not openpype_dir.exists() and not openpype_dir.is_dir():
return _openpype_versions
# iterate over directory in first level and find all that might
# contain OpenPype.
for item in openpype_dir.iterdir():