fix raising exception syntax in python 3