From: Adam Glasgall Date: Sun, 28 Apr 2013 19:38:04 +0000 (-0400) Subject: more string/unistring idiocy X-Git-Tag: 0.0.7~2 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-dhcp.git/commitdiff_plain/15cc0f64d318944b13e6244b5302b192ef73f9fc more string/unistring idiocy --- 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