def do_logout(self, args): """ Logout of session started with login with username and password """ try: logout(self.url, self.credentials.get('session')) except Exception, e: pass