Prep work for inserting directly from HHC

This commit is contained in:
Worros 2009-07-17 17:16:06 +08:00
parent 152f16c7a0
commit 61b0b8f4fe

View File

@ -83,6 +83,8 @@ class Importer:
self.fdb.do_connect(self.config)
self.fdb.db.rollback()
self.NEWIMPORT = False
#Set functions
def setCallHud(self, value):
self.callHud = value
@ -311,8 +313,16 @@ class Importer:
obj = getattr(mod, filter_name, None)
if callable(obj):
conv = obj(in_path = file, out_path = out_path)
if(conv.getStatus()):
if(conv.getStatus() and self.NEWIMPORT == False):
(stored, duplicates, partial, errors, ttime) = self.import_fpdb_file(out_path, site)
elif (conv.getStatus() and self.NEWIMPORT == True):
#This code doesn't do anything yet
handlist = hhc.getProcessedHands()
self.pos_in_file[file] = hhc.getLastCharacterRead()
for hand in handlist:
hand.prepInsert()
hand.insert()
else:
# conversion didn't work
# TODO: appropriate response?