chiark / gitweb /
update: fix encoding issues with the xml index
authorDaniel Martí <mvdan@mvdan.cc>
Mon, 4 Jan 2016 20:10:18 +0000 (21:10 +0100)
committerDaniel Martí <mvdan@mvdan.cc>
Fri, 11 Mar 2016 13:27:00 +0000 (13:27 +0000)
fdroidserver/update.py

index de75848dc1f4625ba11fe2fcc0f0192c3db433cd..0e0aef68458ee100841929b6e1cad2c7f5f9d07b 100644 (file)
@@ -826,7 +826,7 @@ def make_index(apps, sortedids, apks, repodir, archive, categories):
             logging.warning("\tfdroid update --create-key")
             sys.exit(1)
 
-    repoel.setAttribute("pubkey", extract_pubkey())
+    repoel.setAttribute("pubkey", extract_pubkey().decode('utf-8'))
     root.appendChild(repoel)
 
     for appid in sortedids:
@@ -966,9 +966,9 @@ def make_index(apps, sortedids, apks, repodir, archive, categories):
                     os.symlink(sigfile_path, siglinkname)
 
     if options.pretty:
-        output = doc.toprettyxml()
+        output = doc.toprettyxml(encoding='utf-8')
     else:
-        output = doc.toxml()
+        output = doc.toxml(encoding='utf-8')
 
     with open(os.path.join(repodir, 'index.xml'), 'wb') as f:
         f.write(output)