From 0897e0d408df880974f362cb864d7e7fbdd444c9 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 3 Jan 2014 13:39:20 -0500 Subject: [PATCH] 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 --- pyghmi/ipmi/private/session.py | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/pyghmi/ipmi/private/session.py b/pyghmi/ipmi/private/session.py index 2356b444..83971eaf 100644 --- a/pyghmi/ipmi/private/session.py +++ b/pyghmi/ipmi/private/session.py @@ -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__":