From 0b7149c11b9b71cf64158d711fb65e19af6697e6 Mon Sep 17 00:00:00 2001 From: luyf5 Date: Wed, 1 Sep 2021 15:34:43 +0800 Subject: [PATCH] fix remote console function for thinkserver https://gitlab.icelab.lenovo.com/pygcon/pyghmi/commit/6f9e457b5b5767ff51ed93d90d45974a0b8e6087 Fix remote console function for thinkserver Adds conn.cookies = {} to erase the cookies stored by the webclient. We do not want to use it's cookies management mechanism, since it will erase an authentication cookie we need to pass in a following request. Change-Id: I26e3599caff5c6159ec798b62e972747f0a4109f --- pyghmi/ipmi/oem/lenovo/handler.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pyghmi/ipmi/oem/lenovo/handler.py b/pyghmi/ipmi/oem/lenovo/handler.py index 60dcfcaf..cff21030 100755 --- a/pyghmi/ipmi/oem/lenovo/handler.py +++ b/pyghmi/ipmi/oem/lenovo/handler.py @@ -792,6 +792,7 @@ class OEMHandler(generic.OEMHandler): conn.request('POST', '/rpc/WEBSES/create.asp', params, headers) rsp = conn.getresponse() if rsp.status == 200: + conn.cookies = {} body = rsp.read().split('\n') session_line = None for line in body: