diff --git a/pypureomapi.py b/pypureomapi.py index 3c906a3..bb870a4 100644 --- a/pypureomapi.py +++ b/pypureomapi.py @@ -1311,7 +1311,7 @@ def add_host_supersede(self, ip, mac, name, hostname=None, router=None, domain=N msg = OmapiMessage.open(b"host") msg.message.append((b"create", struct.pack("!I", 1))) - msg.obj.append((b"name", name)) + msg.obj.append((b"name", name.encode('utf-8'))) msg.obj.append((b"hardware-address", pack_mac(mac))) msg.obj.append((b"hardware-type", struct.pack("!I", 1))) msg.obj.append((b"ip-address", pack_ip(ip)))