mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Closes #1680: fix botched error check for nonexisting environment file
This commit is contained in:
parent
d9f192b3bf
commit
f2b910a7b2
@ -218,7 +218,7 @@ class Sphinx(object):
|
||||
self.env.domains[domain] = self.domains[domain](self.env)
|
||||
self.info('done')
|
||||
except Exception as 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)
|
||||
|
Loading…
Reference in New Issue
Block a user