Re-enable unicode encoding (required for storm).
authorJelmer Vernooij <jelmer@samba.org>
Wed, 17 Nov 2010 00:18:32 +0000 (01:18 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Wed, 17 Nov 2010 00:18:32 +0000 (01:18 +0100)
buildfarm/hostdb.py

index 24186c24529bef2b5b23277a7c7261c902f9a1fe..ed4e753d3c2c8f623c41c329d1f6e1829b9d2b1c 100644 (file)
@@ -125,7 +125,7 @@ class HostDatabase(object):
         """Write out the web/"""
 
         for host in self.hosts():
-            yield "%s: %s\n" % (host.name, host.platform.encode("utf-8"))
+            yield "%s: %s\n" % (host.name.encode("utf-8"), host.platform.encode("utf-8"))
 
     def commit(self):
         pass
@@ -143,7 +143,7 @@ class PlainTextHostDatabase(HostDatabase):
         try:
             for l in f:
                 (host, platform) = l.split(":", 1)
-                ret[host] = platform.strip().decode("utf-8")
+                ret[host.decode("utf-8")] = platform.strip().decode("utf-8")
         finally:
             f.close()
         return cls(ret)