From 6214131713a1be1cba5724baab5be0c9641d3701 Mon Sep 17 00:00:00 2001 From: Worros Date: Thu, 5 Feb 2009 18:50:50 +0900 Subject: [PATCH] Small change - note we should error check --- pyfpdb/EverleafToFpdb.py | 2 +- pyfpdb/HandHistoryConverter.py | 4 +++- pyfpdb/fpdb_import.py | 5 +++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pyfpdb/EverleafToFpdb.py b/pyfpdb/EverleafToFpdb.py index 4e51213f..6d409bda 100755 --- a/pyfpdb/EverleafToFpdb.py +++ b/pyfpdb/EverleafToFpdb.py @@ -86,7 +86,7 @@ class Everleaf(HandHistoryConverter): self.rexx.compileRegexes() def readSupportedGames(self): - pass + return [["ring", "hold", "nl"]] def determineGameType(self): # Cheating with this regex, only support nlhe at the moment diff --git a/pyfpdb/HandHistoryConverter.py b/pyfpdb/HandHistoryConverter.py index 8d7df813..a698c390 100644 --- a/pyfpdb/HandHistoryConverter.py +++ b/pyfpdb/HandHistoryConverter.py @@ -151,7 +151,9 @@ class HandHistoryConverter: ##### # These functions are parse actions that may be overridden by the inheriting class - # + # This function should return a list of lists looking like: + # return [["ring", "hold", "nl"], ["tour", "hold", "nl"]] + # Showing all supported games limits and types def readSupportedGames(self): abstract diff --git a/pyfpdb/fpdb_import.py b/pyfpdb/fpdb_import.py index 09a26665..b9a8f0bf 100644 --- a/pyfpdb/fpdb_import.py +++ b/pyfpdb/fpdb_import.py @@ -162,8 +162,9 @@ class Importer: if(filter == "EverleafToFpdb"): conv = EverleafToFpdb(self.config, file) - conv.readSupportedGames() # Should this be done by HHC on init? - conv.determineGameType() + supp = conv.readSupportedGames() # Should this be done by HHC on init? + gt = conv.determineGameType() + # TODO: Check that gt is in supp - error appropriately if not conv.processFile() if(conv.getStatus()): (stored, duplicates, partial, errors, ttime) = self.import_fpdb_file(conv.getProcessedFile(ofile), site)