2
0
mirror of https://opendev.org/x/pyghmi synced 2025-01-16 04:38:19 +00:00

Remove surviving 'callback' code

Having previously forgotten about the callback option in logout, programs
could generally not actually complete.  Fix it so that logout() works as
intended.

Change-Id: I04394821646074c734438b7de6970c8282e2c761
This commit is contained in:
Jarrod Johnson 2014-01-03 13:39:20 -05:00
parent 9290111ba7
commit 0897e0d408

View File

@ -1140,27 +1140,19 @@ class Session(object):
raise exc.IpmiException(
"Unable to transmit to specified address")
def logout(self, callback=None, callback_args=None):
def logout(self):
if not self.logged:
if callback is None:
return {'success': True}
callback({'success': True})
return
return {'success': True}
if self.cleaningup:
self.nowait = True
callback = False
self.raw_command(command=0x3c,
netfn=6,
data=struct.unpack("4B",
struct.pack("I", self.sessionid)),
retry=False,
callback=callback,
callback_args=callback_args)
retry=False)
self.logged = 0
self.nowait = False
if not callback:
return {'success': True}
callback({'success': True})
return {'success': True}
if __name__ == "__main__":