Fixed Exception handling syntax for Python3