]> git.decadent.org.uk Git - dak.git/commitdiff
Avoid converting unicode strings into yaml nodes
authorLuca Falavigna <dktrkranz@debian.org>
Tue, 11 Jan 2011 13:38:15 +0000 (13:38 +0000)
committerLuca Falavigna <dktrkranz@debian.org>
Tue, 11 Jan 2011 13:38:15 +0000 (13:38 +0000)
Signed-off-by: Luca Falavigna <dktrkranz@debian.org>
dak/override_disparity.py

index fd3bc503e72124ccd055b607359bba12a8a77914..b0218517048e564ac82d022b7b4de173ea405bbb 100755 (executable)
@@ -128,13 +128,13 @@ def main():
                          if not out.has_key(d):
                              out[d] = {}
                          out[d]['priority'] = priorities[d][1]
-                         out[d]['maintainer'] = priorities[d][2]
+                         out[d]['maintainer'] = unicode(priorities[d][2], 'utf-8')
                          out[d]['priority'] = priorities[d][1]
                          priorities[d][3] = False
                      if not out[d].has_key('dependency'):
                          out[d]['dependency'] = {}
                      out[d]['dependency'][p] = priorities[p][1]
-    yaml.dump(out, outfile, default_flow_style=False)
+    yaml.safe_dump(out, outfile, default_flow_style=False)
     if Options.has_key('file'):
         outfile.close()