Fix UnboundLocalError when no http_info