+ # machine readable summary
+ if Cnf.has_key("Show-Deferred::LinkPath"):
+ fn = os.path.join(Cnf["Show-Deferred::LinkPath"],'.status.tmp')
+ f = open(fn,"w")
+ try:
+ for u in uploads:
+ print >> f, "Changes-file: %s"%u[1]
+ fields = """Location: DEFERRED
+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')
+ print >> f
+ f.close()
+ os.rename(os.path.join(Cnf["Show-Deferred::LinkPath"],'.status.tmp'),
+ os.path.join(Cnf["Show-Deferred::LinkPath"],'status'))
+ except:
+ os.unlink(fn)
+ raise