From 15cc0f64d318944b13e6244b5302b192ef73f9fc Mon Sep 17 00:00:00 2001 From: Adam Glasgall Date: Sun, 28 Apr 2013 15:38:04 -0400 Subject: [PATCH] more string/unistring idiocy --- debian/changelog | 6 ++++++ invirt-dhcpserver | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 6151d0d..3b75785 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +invirt-dhcp (0.0.6~glasgall5) precise; urgency=low + + * more string/unistring idiocy + + -- Adam Glasgall Sun, 28 Apr 2013 15:37:37 -0400 + invirt-dhcp (0.0.6~glasgall4) precise; urgency=low * pydhcplib is not terribly pythonic. diff --git a/invirt-dhcpserver b/invirt-dhcpserver index e7f37e8..2c36b22 100755 --- a/invirt-dhcpserver +++ b/invirt-dhcpserver @@ -103,9 +103,9 @@ class DhcpBackend: options = {} if nic.hostname and '.' in nic.hostname: - options['host_name'], options['domain_name'] = nic.hostname.split('.', 1) + options['host_name'], options['domain_name'] = nic.hostname.encode('utf-8').split('.', 1) elif nic.machine.name: - options['host_name'] = nic.machine.name + options['host_name'] = nic.machine.name.encode('utf-8') options['domain_name'] = config.dns.domains[0] else: hostname = None -- 1.7.9.5