Made raise conform to python 3 syntax