Allow seeding of date.

This commit is contained in:
Tom Payne 2008-12-04 17:32:42 +01:00
parent b2f2e667e0
commit 3f977c0952
1 changed files with 3 additions and 1 deletions

View File

@ -196,7 +196,7 @@ class LRecord(Record):
class IGC(object):
def __init__(self, file):
def __init__(self, file, date=None):
try:
self.filename = file.name
except AttributeError:
@ -208,6 +208,8 @@ class IGC(object):
self.i = {}
self.l = []
self.records = []
if date:
HRecord.parse(date.strftime('HFDTE%d%m%y'), self)
for line in file:
try:
line = line.rstrip()