#165 fix python 2 support

This commit is contained in:
nvbn
2015-05-06 13:17:14 +02:00
parent 608d48e408
commit 5864faadef
3 changed files with 9 additions and 7 deletions
+3 -2
View File
@@ -1,14 +1,15 @@
import subprocess
from thefuck.utils import DEVNULL
def __command_available(command):
try:
subprocess.check_output([command], stderr=subprocess.DEVNULL)
subprocess.check_output([command], stderr=DEVNULL)
return True
except subprocess.CalledProcessError:
# command exists but is not happy to be called without any argument
return True
except FileNotFoundError:
except OSError:
return False