exception handling changed to Python 3 and PEP 8
exception handling changed to Python 3 and PEP 8
changed import statement for Python 3-compatible