mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
fix which import
This commit is contained in:
parent
59260feeb9
commit
0841d91eef
1 changed files with 10 additions and 1 deletions
|
|
@ -4,7 +4,16 @@ import os
|
|||
import logging
|
||||
import subprocess
|
||||
import platform
|
||||
from shutil import which
|
||||
try:
|
||||
from shutil import which
|
||||
except ImportError:
|
||||
# we are in python < 3.3
|
||||
def which(command):
|
||||
path = os.getenv('PATH')
|
||||
for p in path.split(os.path.pathsep):
|
||||
p = os.path.join(p, command)
|
||||
if os.path.exists(p) and os.access(p, os.X_OK):
|
||||
return p
|
||||
|
||||
handler = logging.basicConfig()
|
||||
log = logging.getLogger("Publish Image Sequences")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue