2
0
mirror of https://opendev.org/x/pyghmi synced 2026-03-28 13:53:30 +00:00

Change graphical console launcher to use base64 encoding

Change-Id: Id8b0ae08189914dd75824c1e4644efa95fe7d60a
This commit is contained in:
Allan Vidal
2015-12-09 17:31:06 -02:00
committed by Jarrod Johnson
parent 2f31a94c9e
commit fae22cae07

View File

@@ -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):