... | ... |
@@ -57,7 +57,12 @@ import tempfile |
57 | 57 |
from copy import copy |
58 | 58 |
from optparse import OptionParser, Option, OptionValueError, IndentedHelpFormatter |
59 | 59 |
from logging import debug, info, warning, error |
60 |
-from shutil import which |
|
60 |
+ |
|
61 |
+try: |
|
62 |
+ from shutil import which |
|
63 |
+except ImportError: |
|
64 |
+ # python2 fallback code |
|
65 |
+ from distutils.spawn import find_executable as which |
|
61 | 66 |
|
62 | 67 |
from ssl import SSLError |
63 | 68 |
import io |