summaryrefslogtreecommitdiff
path: root/reprepro/conf/diffsonly.py
diff options
context:
space:
mode:
Diffstat (limited to 'reprepro/conf/diffsonly.py')
-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")