Bläddra i källkod

HUE-2198 [core] Reduce noise such as "Mutual authentication unavailable on 200 response"

https://github.com/requests/requests-kerberos/issues/45
Romain Rigaux 10 år sedan
förälder
incheckning
b1476da3f9

+ 3 - 2
desktop/core/ext-py/requests-kerberos-0.6.1/requests_kerberos/kerberos_.py

@@ -191,8 +191,9 @@ class HTTPKerberosAuth(AuthBase):
                 return response
 
             elif is_http_error or self.mutual_authentication == OPTIONAL:
-                log.error("handle_other(): Mutual authentication unavailable "
-                          "on {0} response".format(response.status_code))
+                if not response.ok:
+                    log.error("handle_other(): Mutual authentication unavailable "
+                              "on {0} response".format(response.status_code))
 
                 if self.mutual_authentication == REQUIRED:
                     return SanitizedResponse(response)