fix #220: errno error.
This commit is contained in:
parent
d06c8da29b
commit
246a00671e
@ -3,6 +3,7 @@ from __future__ import print_function, unicode_literals
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import shlex
|
import shlex
|
||||||
|
import errno
|
||||||
import locale
|
import locale
|
||||||
import codecs
|
import codecs
|
||||||
import tempfile
|
import tempfile
|
||||||
@ -237,7 +238,7 @@ class InputUI(PrintUI):
|
|||||||
try:
|
try:
|
||||||
subprocess.call(cmd)
|
subprocess.call(cmd)
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
if e.errno == os.errno.ENOENT:
|
if e.errno == errno.ENOENT:
|
||||||
self.error(("Error while calling editor '{}'. The editor may "
|
self.error(("Error while calling editor '{}'. The editor may "
|
||||||
"not be present. You can change the text editor "
|
"not be present. You can change the text editor "
|
||||||
"that pubs uses by setting the $EDITOR environment "
|
"that pubs uses by setting the $EDITOR environment "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user