Parsing the value of the active python exception