From a39b4704e6ca6b6fa8eb2b54ad23cf8f09e879a4 Mon Sep 17 00:00:00 2001 From: Worros Date: Tue, 9 Nov 2010 20:08:15 +0800 Subject: [PATCH] TourneySummary: Add ability to create a db object if passed None --- pyfpdb/TourneySummary.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyfpdb/TourneySummary.py b/pyfpdb/TourneySummary.py index 884d724e..9ca4c27b 100644 --- a/pyfpdb/TourneySummary.py +++ b/pyfpdb/TourneySummary.py @@ -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()