diff --git a/pyghmi/ipmi/command.py b/pyghmi/ipmi/command.py index 704556ad..732d5d13 100644 --- a/pyghmi/ipmi/command.py +++ b/pyghmi/ipmi/command.py @@ -178,7 +178,7 @@ class Command(object): 'device_id': response['data'][0], 'device_revision': response['data'][1] & 0b1111, 'manufacturer_id': struct.unpack( - ' len(password) > 16: - password = password.ljust(20, '\x00') + password = password.ljust(20, b'\x00') data[0] |= 0b10000000 elif len(password) > 20: raise Exception('password has limit of 20 chars') @@ -1680,7 +1680,7 @@ class Command(object): # however another convention that exists is all '\xff' # if this fails, pass up the error so that calling code knows # that the deletion did not go as planned for now - self.set_user_name(uid, '\xff' * 16) + self.set_user_name(uid, b'\xff' * 16) return True def disable_user(self, uid, mode):