height="31" width="88"></a>
"""
res += "</body></html>"
- return res
+ return res.encode('utf-8')
def table_header():
return """<h1>Deferred uploads</h1>
print header()
if uploads:
print table_header()
- print ''.join(map(lambda x: table_row(*x[1:5]), uploads))
+ print ''.join(map(lambda x: table_row(*x[1:5]), uploads)).encode('utf-8')
print table_footer()
else:
print '<h1>Currently no deferred uploads to Debian</h1>'
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'),