changeset 3:a943cfdfbad9

Remove obsolete code. Remove some unnecessary module imports and code that worked with UNIX timestamps.
author John "Elwin" Edwards <elwin@sdf.org>
date Thu, 26 Jul 2012 09:35:07 -0700
parents 8f49df4074d7
children f5a37cc7f41f
files py/recorder.py py/rlgalldb.py web/archive.cgi
diffstat 3 files changed, 0 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/py/recorder.py	Thu Jul 26 08:07:00 2012 -0700
+++ b/py/recorder.py	Thu Jul 26 09:35:07 2012 -0700
@@ -1,8 +1,6 @@
 #!/usr/bin/python
 
 import os
-import time
-import calendar
 import psycopg2
 import rlgalldb as rlgall
 
--- a/py/rlgalldb.py	Thu Jul 26 08:07:00 2012 -0700
+++ b/py/rlgalldb.py	Thu Jul 26 09:35:07 2012 -0700
@@ -2,10 +2,8 @@
 # Module for the Roguelike Gallery, using a postgres database
 
 import os
-import sys
 import time
 import calendar
-import re
 import psycopg2
 from datetime import datetime, tzinfo, timedelta
 
@@ -71,13 +69,6 @@
     return None
   return conn
 
-def recnameToInt(filename):
-  recre = r"(\d{4})-(\d{2})-(\d{2})\.(\d{2}):(\d{2}):(\d{2})\.ttyrec$"
-  match = re.match(recre, filename)
-  if not match:
-    return None
-  return calendar.timegm([int(val) for val in match.groups()])
-
 def recnameToTS(filename):
   pattern = "%Y-%m-%d.%H:%M:%S.ttyrec"
   try:
--- a/web/archive.cgi	Thu Jul 26 08:07:00 2012 -0700
+++ b/web/archive.cgi	Thu Jul 26 09:35:07 2012 -0700
@@ -3,7 +3,6 @@
 import cgi
 import os
 import sys
-import re
 import time
 import calendar
 from datetime import datetime
@@ -17,8 +16,6 @@
 """
 
 ttyrecbase = "/var/dgl/dgldir/ttyrec/"
-recre = r"(\d{4,4})-(\d{2,2})-(\d{2,2})\.(\d{2,2}):(\d{2,2}):(\d{2,2})\.ttyrec"
-recrec = re.compile(recre)
 
 def input_game(outf, selected=None):
   "Prints the form components for selecting a game."