diff py/rlgalldb.py @ 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 def7fecbd437
children f5a37cc7f41f
line wrap: on
line diff
--- 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: