From e6b31838bb1d4d4d50c7113c1b8d1eed5db18b27 Mon Sep 17 00:00:00 2001 From: Marcelo Fernandes Date: Tue, 15 Aug 2017 23:10:39 -0300 Subject: [PATCH] "if-else" changes. --- keycloak/connection.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/keycloak/connection.py b/keycloak/connection.py index 77c2959..edb1397 100644 --- a/keycloak/connection.py +++ b/keycloak/connection.py @@ -61,9 +61,9 @@ class ConnectionManager(object): :arg key (str): Key of the header parameters. :return: - If the header parameters exist, return value him. + If the header parameters exist, return its value. """ - return self.__headers[key] if key in self.__headers.keys() else None + return self.__headers.get(key) def clean_headers(self): """ Clear header parameters. """ @@ -76,7 +76,7 @@ class ConnectionManager(object): :return: If the header parameters exist, return True. """ - return True if self.get_param_headers(key) else False + return self.get_param_headers(key) is not None def add_param_headers(self, key, value): """ Add a single parameter in header.