Closes #1680: fix botched error check for nonexisting environment file

This commit is contained in:
Georg Brandl 2015-01-17 11:22:40 +01:00
parent 3c872e66a4
commit 14b4a56bec

View File

@ -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)