From fae22cae07556fc0f680ef37b8e2b6425e1092de Mon Sep 17 00:00:00 2001 From: Allan Vidal Date: Wed, 9 Dec 2015 17:31:06 -0200 Subject: [PATCH] Change graphical console launcher to use base64 encoding Change-Id: Id8b0ae08189914dd75824c1e4644efa95fe7d60a --- pyghmi/ipmi/oem/lenovo/handler.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyghmi/ipmi/oem/lenovo/handler.py b/pyghmi/ipmi/oem/lenovo/handler.py index 2b736fb8..dce6bf4f 100755 --- a/pyghmi/ipmi/oem/lenovo/handler.py +++ b/pyghmi/ipmi/oem/lenovo/handler.py @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +import base64 import traceback import urllib @@ -512,7 +513,8 @@ class OEMHandler(generic.OEMHandler): None, headers) rsp = conn.getresponse() if rsp.status == 200: - return rsp.getheader('Content-Type'), rsp.read() + return rsp.getheader('Content-Type'), base64.b64encode( + rsp.read()) conn.close() def get_graphical_console(self):