def fmt_ex(ex):
 return traceback.format_exception_only(ex.__class__, ex)[(-1)].strip()

def fmt_ex ( ex ) : return traceback . format_exception_only ( ex . __class__ , ex ) [ ( - 1 ) ] . strip ( )
format a single line with an exception description .