summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiovanni Mascellani <mascellani@poisson.phc.unipi.it>2011-07-31 11:38:39 +0200
committerSean Finney <seanius@htpc-l.(none)>2011-09-17 13:28:46 +0200
commit1e0c2ed9fb35436ba84bea0752d5a51772cfa51c (patch)
tree1e21f68054acce2bfab152fe59e5645c0b0b3512
parent80ee0baf5dc3b4014e6b65be53bfc78dfdb7671b (diff)
downloadpatch-tracker-1e0c2ed9fb35436ba84bea0752d5a51772cfa51c.tar.gz
Added UTF-8 support to the reprepro filter.
-rwxr-xr-xreprepro/conf/diffsonly.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/reprepro/conf/diffsonly.py b/reprepro/conf/diffsonly.py
index d2f02ea..f8edbe0 100755
--- a/reprepro/conf/diffsonly.py
+++ b/reprepro/conf/diffsonly.py
@@ -4,6 +4,7 @@ from debian_bundle import deb822
from gzip import GzipFile
from fnmatch import fnmatch
import sys
+import codecs
import patchtracker.Conf as Conf
@@ -28,7 +29,7 @@ if __name__ == '__main__':
else:
slist = deb822.Sources.iter_paragraphs(fh)
- outf = file(sys.argv[2], "w")
+ outf = codecs.open(sys.argv[2], mode="w", encoding='utf-8')
print "filtering %s for .diff.gz/.dsc files..."%(inf)
for ent in slist:
for k in ['Files','Checksums-Sha1','Checksums-Sha256']:
@@ -39,5 +40,5 @@ if __name__ == '__main__':
if fnmatch(f['name'], wanted_glob):
newfiles.append(f)
ent[k] = newfiles
- outf.write(str(ent))
+ outf.write(unicode(ent))
outf.write("\n")