mirror of
https://opendev.org/x/pyghmi
synced 2025-02-20 12:30:48 +00:00
Do not reuse a session that is not logged
If a session was not logged, it would still be considered a candidate for new session objects. Disqualify such sessions so that new session objects after a 'logout' or similar will be fulfilled. Change-Id: I7af11a8a300b7aedcadcec7673d6308e3b08f27d
This commit is contained in:
parent
65f2a617d5
commit
95b1c15529
@ -315,7 +315,8 @@ class Session(object):
|
||||
if sockaddr in cls.bmc_handlers:
|
||||
self = cls.bmc_handlers[sockaddr]
|
||||
if (self.bmc == bmc and self.userid == userid and
|
||||
self.password == password and self.kgo == kg):
|
||||
self.password == password and self.kgo == kg and
|
||||
self.logged):
|
||||
trueself = self
|
||||
else:
|
||||
del cls.bmc_handlers[sockaddr]
|
||||
|
Loading…
x
Reference in New Issue
Block a user