Fix change_password option is not enabled in the user management user-update command
[osm/osmclient.git] / osmclient / sol005 / client.py
index b6f12b3..0cbc80a 100644 (file)
@@ -55,7 +55,6 @@ class Client(object):
         project="admin",
         **kwargs
     ):
-
         self._user = user
         self._password = password
         self._project = project
@@ -131,7 +130,9 @@ class Client(object):
 
             token = json.loads(resp) if resp else None
             if token.get("message") == "change_password" and not pwd_change:
-                raise ClientException("Password Expired. Please update the password using change_password option")
+                raise ClientException(
+                    "Password Expired. Please update the password using change_password option"
+                )
             self._token = token["id"]
 
             if self._token is not None:
@@ -141,6 +142,7 @@ class Client(object):
                     for (key, val) in list(self._headers.items())
                 ]
                 self._http_client.set_http_header(http_header)
+            return token
 
     def get_version(self):
         _, resp = self._http_client.get2_cmd(endpoint="/version", skip_query_admin=True)