Remove obsolete code.

Remove some unnecessary module imports and code that worked with UNIX
timestamps.
This commit is contained in:
John "Elwin" Edwards 2012-07-26 09:35:07 -07:00
parent 5eacaecbcb
commit 72fcde0ae0
3 changed files with 0 additions and 14 deletions

View file

@ -1,8 +1,6 @@
#!/usr/bin/python #!/usr/bin/python
import os import os
import time
import calendar
import psycopg2 import psycopg2
import rlgalldb as rlgall import rlgalldb as rlgall

View file

@ -2,10 +2,8 @@
# Module for the Roguelike Gallery, using a postgres database # Module for the Roguelike Gallery, using a postgres database
import os import os
import sys
import time import time
import calendar import calendar
import re
import psycopg2 import psycopg2
from datetime import datetime, tzinfo, timedelta from datetime import datetime, tzinfo, timedelta
@ -71,13 +69,6 @@ def getconn():
return None return None
return conn 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): def recnameToTS(filename):
pattern = "%Y-%m-%d.%H:%M:%S.ttyrec" pattern = "%Y-%m-%d.%H:%M:%S.ttyrec"
try: try:

View file

@ -3,7 +3,6 @@
import cgi import cgi
import os import os
import sys import sys
import re
import time import time
import calendar import calendar
from datetime import datetime from datetime import datetime
@ -17,8 +16,6 @@ the game was spread across? The Archivist can find them all for you.</p>
""" """
ttyrecbase = "/var/dgl/dgldir/ttyrec/" 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): def input_game(outf, selected=None):
"Prints the form components for selecting a game." "Prints the form components for selecting a game."