test: Don't use os.errno. Use errno directly

This commit is contained in:
Takeshi KOMIYA 2018-01-25 00:48:37 +09:00
parent f779fa7ad6
commit 9340a45393

View File

@ -11,6 +11,7 @@
import os
import re
import errno
import subprocess
import pytest
@ -20,7 +21,7 @@ def has_binary(binary):
try:
subprocess.check_output([binary])
except OSError as e:
if e.errno == os.errno.ENOENT:
if e.errno == errno.ENOENT:
# handle file not found error.
return False
else: