Skip to content

Commit b71ad3c

Browse files
authored
Merge pull request #863 from PraveenPenguin/fix_token
Patch fixes issue when login in BMC/eBMC is successful but response bo…
2 parents 2b4912f + a832140 commit b71ad3c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

common/OpTestUtil.py

+6
Original file line numberDiff line numberDiff line change
@@ -2574,6 +2574,12 @@ def login(self, username=None, password=None):
25742574
self.xAuthHeader['X-Auth-Token'] = match.group(1)
25752575
self.jsonHeader.update(self.xAuthHeader)
25762576
json_data = json.loads(r.text)
2577+
if json_data.get('token'):
2578+
json_data={
2579+
"data": "User '%s' logged in" %username,
2580+
"message": "200 OK",
2581+
"status": "ok"
2582+
}
25772583
log.debug("r.status_code={} json_data['status']={}"
25782584
" r.text={} r.headers={} r.request.headers={}"
25792585
.format(r.status_code, json_data['status'],

0 commit comments

Comments
 (0)