TourneySummary: Add ability to create a db object if passed None
This commit is contained in:
parent
9dea6cc8e3
commit
a39b4704e6
|
@ -37,6 +37,7 @@ from Exceptions import *
|
||||||
import pprint
|
import pprint
|
||||||
import DerivedStats
|
import DerivedStats
|
||||||
import Card
|
import Card
|
||||||
|
import Database
|
||||||
|
|
||||||
log = logging.getLogger("parser")
|
log = logging.getLogger("parser")
|
||||||
|
|
||||||
|
@ -118,6 +119,8 @@ class TourneySummary(object):
|
||||||
if builtFrom=="IMAP":
|
if builtFrom=="IMAP":
|
||||||
# Fix line endings?
|
# Fix line endings?
|
||||||
pass
|
pass
|
||||||
|
if self.db == None:
|
||||||
|
self.db = Database.Database(config)
|
||||||
|
|
||||||
self.parseSummary()
|
self.parseSummary()
|
||||||
self.insertOrUpdate()
|
self.insertOrUpdate()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user