From 246a00671e78b9d4353cea9b2eb0c0d07e3682c5 Mon Sep 17 00:00:00 2001 From: "Fabien C. Y. Benureau" Date: Wed, 8 Apr 2020 11:06:22 +0900 Subject: [PATCH] fix #220: errno error. --- pubs/uis.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pubs/uis.py b/pubs/uis.py index 46258ce..fc96aed 100644 --- a/pubs/uis.py +++ b/pubs/uis.py @@ -3,6 +3,7 @@ from __future__ import print_function, unicode_literals import os import sys import shlex +import errno import locale import codecs import tempfile @@ -237,7 +238,7 @@ class InputUI(PrintUI): try: subprocess.call(cmd) except OSError as e: - if e.errno == os.errno.ENOENT: + if e.errno == errno.ENOENT: self.error(("Error while calling editor '{}'. The editor may " "not be present. You can change the text editor " "that pubs uses by setting the $EDITOR environment "