TourneySummary: Add ability to create a db object if passed None

This commit is contained in:
Worros 2010-11-09 20:08:15 +08:00
parent 9dea6cc8e3
commit a39b4704e6

View File

@ -37,6 +37,7 @@ from Exceptions import *
import pprint
import DerivedStats
import Card
import Database
log = logging.getLogger("parser")
@ -118,6 +119,8 @@ class TourneySummary(object):
if builtFrom=="IMAP":
# Fix line endings?
pass
if self.db == None:
self.db = Database.Database(config)
self.parseSummary()
self.insertOrUpdate()