use get_path_to_ffmpeg which checks if any of filled ffmpeg paths in FFMPEG_PATH exists

This commit is contained in:
iLLiCiTiT 2020-02-11 14:01:56 +01:00
parent c71b8dbf2c
commit 62b3f852f1
9 changed files with 28 additions and 13 deletions

View file

@ -13,6 +13,15 @@ import avalon
log = logging.getLogger(__name__)
def get_path_to_ffmpeg():
paths = os.environ.get("FFMPEG_PATH") or ""
path_items = paths.split(os.pathsep)
for item in path_items:
item = os.path.normpath(item)
if os.path.exists(item):
return item
return ""
# Special naming case for subprocess since its a built-in method.
def _subprocess(*args, **kwargs):
"""Convenience method for getting output errors for subprocess."""