mirror of
https://opendev.org/x/pyghmi
synced 2026-05-17 03:44:24 +00:00
Fix user enablement on SMM on python3
Normalize to str to have format available in python 3 environments Change-Id: I09f12d974a77ddf2526da9e6f276402de0cc5b8d
This commit is contained in:
@@ -540,8 +540,10 @@ class SMMClient(object):
|
||||
if priv.lower() == 'administrator':
|
||||
rsp = self.ipmicmd.xraw_command(netfn=6, command=0x46, data=(uid,))
|
||||
username = bytes(rsp['data']).rstrip(b'\x00')
|
||||
if not isinstance(username, str):
|
||||
username = username.decode('utf8')
|
||||
self.wc.request(
|
||||
'POST', '/data', b'set=user({0},1,{1},511,,4,15,0)'.format(
|
||||
'POST', '/data', 'set=user({0},1,{1},511,,4,15,0)'.format(
|
||||
uid, username))
|
||||
rsp = self.wc.getresponse()
|
||||
rsp.read()
|
||||
|
||||
Reference in New Issue
Block a user