add old formatting for old pythons, use exception.code for new