aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/mapfile.py
diff options
context:
space:
mode:
authorAaron Bentley <abentley@panoramicfeedback.com>2006-01-26 10:10:43 -0500
committerAaron Bentley <abentley@panoramicfeedback.com>2006-01-26 10:10:43 -0500
commitc54498e1b59b2e4371fb76e07a5e81365a940f88 (patch)
tree6bd9221a42834d67edfc7d032d48072e9d7957a8 /libbe/mapfile.py
parent4eb3e0d84a15aabbf723fe9b3696dfc81efd9bb0 (diff)
downloadbugseverywhere-c54498e1b59b2e4371fb76e07a5e81365a940f88.tar.gz
Enforced that all key/value pairs are unicode
Diffstat (limited to 'libbe/mapfile.py')
-rw-r--r--libbe/mapfile.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/libbe/mapfile.py b/libbe/mapfile.py
index 3760938..bbbd860 100644
--- a/libbe/mapfile.py
+++ b/libbe/mapfile.py
@@ -67,7 +67,7 @@ def generate(f, map, context=3):
for key in keys:
for i in range(context):
f.write("\n")
- f.write("%s=%s\n" % (key, map[key]))
+ f.write("%s=%s\n" % (key.encode("utf-8"), map[key].encode("utf-8")))
for i in range(context):
f.write("\n")
@@ -94,7 +94,7 @@ def parse(f):
line = line.rstrip('\n')
if len(line) == 0:
continue
- name,value = line.split('=', 1)
+ name,value = [f.decode('utf-8') for f in line.split('=', 1)]
assert not result.has_key('name')
result[name] = value
return result