]> git.decadent.org.uk Git - dak.git/commitdiff
Fix unicode issue in show-deferred.
authorTorsten Werner <twerner@debian.org>
Sat, 26 Mar 2011 15:52:33 +0000 (16:52 +0100)
committerTorsten Werner <twerner@debian.org>
Sat, 26 Mar 2011 15:52:33 +0000 (16:52 +0100)
Signed-off-by: Torsten Werner <twerner@debian.org>
dak/show_deferred.py

index 6307bd384f59b1d1d8ee5bac66ff768733db6878..dce80987bd3d72238c466bb877fbf3e2a7241659 100755 (executable)
@@ -242,8 +242,9 @@ def list_uploads(filelist, rrd_dir):
 Delayed-Until: %s
 Delay-Remaining: %s"""%(time.strftime("%Y-%m-%d %H:%M:%S", time.gmtime(time.time()+u[0])),u[2])
                 print >> f, fields
-                print >> f, str(u[5]).rstrip()
-                open(os.path.join(Cnf["Show-Deferred::LinkPath"],u[1]),"w").write(str(u[5])+fields+'\n')
+                encoded = unicode(u[5]).encode('utf-8')
+                print >> f, encoded.rstrip()
+                open(os.path.join(Cnf["Show-Deferred::LinkPath"],u[1]),"w").write(encoded+fields+'\n')
                 print >> f
             f.close()
             os.rename(os.path.join(Cnf["Show-Deferred::LinkPath"],'.status.tmp'),