diff py/rlgall.py @ 100:44e8aaa20d02 default tip

Fix the format of archive links.
author John "Elwin" Edwards
date Wed, 03 Aug 2022 20:49:38 -0400
parents d417016bbf73
children
line wrap: on
line diff
--- a/py/rlgall.py	Sun Jan 02 20:40:05 2022 -0500
+++ b/py/rlgall.py	Wed Aug 03 20:49:38 2022 -0400
@@ -86,7 +86,7 @@
 
 def linktoArchive(entry):
   "Takes an entry dict and returns a link to the ttyrec archivist."
-  lstr = '<a href="/archive.cgi?name={0};game={1};time={2}">{3}</a>'
+  lstr = '<a href="/archive.cgi?name={0}&amp;game={1}&amp;time={2}">{3}</a>'
   linktext = entry["endt"].strftime("%Y/%m/%d %H:%M:%S")
   stamp = int(entry["endt"].timestamp())
   escname = html.escape(entry["name"])
@@ -215,7 +215,7 @@
       if result:
         prev = result[0]
       else:
-        prev = datetime.fromtimestamp(0, pytz.utc);
+        prev = datetime.fromtimestamp(0, pytz.utc)
       ttyrecdir = "/var/dgl/dgldir/ttyrec/{0}/{1}/".format(nameF, self.uname)
       allfilekeys = [ (recnameToTS(f), f) for f in os.listdir(ttyrecdir) ]
       vfilekeys = [ e for e in allfilekeys if e[0] > prev ]