From 29366d3bb6731c73966c8391a799db2358211d5d Mon Sep 17 00:00:00 2001 From: Ray Date: Thu, 30 Jul 2009 23:42:57 -0400 Subject: [PATCH] Ugly fix to prevent importing from failing due to undef positions array. --- pyfpdb/fpdb_parse_logic.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pyfpdb/fpdb_parse_logic.py b/pyfpdb/fpdb_parse_logic.py index fd2d6796..673254d0 100644 --- a/pyfpdb/fpdb_parse_logic.py +++ b/pyfpdb/fpdb_parse_logic.py @@ -167,7 +167,12 @@ def mainParser(settings, siteID, category, hand, config, db = None): except: print "parse: error during commit: " + str(sys.exc_value) - +# HERE's an ugly kludge to keep from failing when positions is undef +# We'll fix this by getting rid of the legacy importer. REB + try: + if positions: pass + except: + positions = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] # save data structures in a HandToWrite instance and then insert into database: htw = Database.HandToWrite() htw.set_all( config, settings, base, category, siteTourneyNo, buyin