error handling python 2.6