From 0841d91eef7584e729b58db8d3b2c8340d7e2b3a Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Mon, 16 Dec 2019 14:13:31 +0100 Subject: [PATCH] fix which import --- pype/scripts/publish_filesequence.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pype/scripts/publish_filesequence.py b/pype/scripts/publish_filesequence.py index 7ad7318831..5517cfeb4c 100644 --- a/pype/scripts/publish_filesequence.py +++ b/pype/scripts/publish_filesequence.py @@ -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")