Better write it as:

~~~~
if e.errno != errno.ENOENT:
    raise
~~~~