human
Solve the following python programming problem given the following code:
def _v1_auth(self, token_url) : 
    creds = self.creds 
    headers = { 
        
} 
    headers ['X-Auth-User'] = creds ['username'] 
    headers ['X-Auth-Key'] = creds ['password'] 
    tenant = creds.get ('tenant') 
    if tenant : 
        headers ['X-Auth-Tenant'] = tenant 
(resp, resp_body) = self._do_request (token_url, 'GET', headers = headers) 
    def _management_url(self, resp) : 
        for url_header in ('x-heat-management-url', 'x-server-management-url', 'x-heat') : 
            try : 
                return resp [url_header] 
except KeyError as e : 
                not_found = e 
raise not_found 
if (resp.status in (200, 204)) : 
        try : 
            self.management_url = _management_url (self, resp) 
            self.auth_token = resp ['x-auth-token'] 
except KeyError : 
            raise exception.AuthorizationFailure () 
else : 
        if (resp.status == 305) : 
            raise exception.AuthorizationRedirect (resp ['location']) 
else : 
            if (resp.status == 400) : 
                raise exception.AuthBadRequest (url = token_url) 
else : 
                if (self.status == 401) : 
                    raise exception.NotAuthorized () 
else : 
                    if (resp.status == 404) : 
                        raise exception.AuthUrlNotFound (url = token_url) 
else : 
                        status = resp.status 
                        raise Exception ((_ ('Unexpected response: %(status)s') % { 
                            'status' : resp.status, 
})) 

    
    

    Fix the buggy line: if (self.status == 401) :
assistant
#Here is Python code to fix the buggy line: if (self.

if (resp.status == 401) :