Minor nit: catching errors in this way isn't portable IIRC IronPython and some other Python runtimes don't support it.