+ # 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: %s
+Location: DEFERRED
+Delayed-Until: %s
+Delay-Remaining: %s"""%(u[1],time.strftime("%Y-%m-%d %H:%M:%S", time.gmtime(time.time()+u[0])),u[2])
+ for k,v in u[5].items():
+ if not k.startswith('Checksums-') and k != 'Files':
+ print >> f, "%s: %s"%(k,v)
+ 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