mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
test: Don't use os.errno. Use errno directly
This commit is contained in:
parent
f779fa7ad6
commit
9340a45393
@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
import errno
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
@ -20,7 +21,7 @@ def has_binary(binary):
|
|||||||
try:
|
try:
|
||||||
subprocess.check_output([binary])
|
subprocess.check_output([binary])
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
if e.errno == os.errno.ENOENT:
|
if e.errno == errno.ENOENT:
|
||||||
# handle file not found error.
|
# handle file not found error.
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user