[Tutor] Error Handling

Michael Lewis mjolewis at gmail.com
Sun Mar 25 18:54:35 CEST 2012


In the below block, why is the if statement e.errno != errno.EEXIST?
Why can the errno be both before and after the "."?

import os, errno

try:


    os.makedirs('a/b/c')

except OSError, e:


    if e.errno != errno.EEXIST:


        raise



-- 
Michael J. Lewis

mjolewis at gmail.com
415.815.7257
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20120325/33304be8/attachment.html>


More information about the Tutor mailing list