From 14b4a56bec5034eca657cc6469d0403ace3c5862 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 17 Jan 2015 11:22:40 +0100 Subject: [PATCH] Closes #1680: fix botched error check for nonexisting environment file --- sphinx/application.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sphinx/application.py b/sphinx/application.py index 8012d2409..5e2aa5195 100644 --- a/sphinx/application.py +++ b/sphinx/application.py @@ -188,7 +188,7 @@ class Sphinx(object): self.env.domains[domain] = self.domains[domain](self.env) self.info('done') except Exception, err: - if type(err) is IOError and err.errno == ENOENT: + if isinstance(err, IOError) and err.errno == ENOENT: self.info('not yet created') else: self.info('failed: %s' % err)