fpdb_save_to_db: minor cleanup

This commit is contained in:
eblade 2009-03-18 17:15:21 -04:00
parent a424a9c77d
commit 1b626271ee

View File

@ -40,14 +40,9 @@ def ring_stud(config, backend, db, cursor, base, category, site_hand_no, gametyp
,seatNos): ,seatNos):
import_options = config.get_import_parameters() import_options = config.get_import_parameters()
if import_options['saveActions'] == 'True':
saveActions = True saveActions = True if import_options['saveActions'] == 'True' else False
else: fastStoreHudCache = True if import_options['fastStoreHudCache'] == 'True' else False
saveActions = False
if import_options['fastStoreHudCache'] == 'True':
fastStoreHudCache = True
else:
fastStoreHudCache = False
fpdb_simple.fillCardArrays(len(names), base, category, card_values, card_suits) fpdb_simple.fillCardArrays(len(names), base, category, card_values, card_suits)
@ -74,14 +69,8 @@ def ring_holdem_omaha(config, backend, db, cursor, base, category, site_hand_no,
"""stores a holdem/omaha hand into the database""" """stores a holdem/omaha hand into the database"""
import_options = config.get_import_parameters() import_options = config.get_import_parameters()
if import_options['saveActions'] == 'True': saveActions = True if import_options['saveActions'] == 'True' else False
saveActions = True fastStoreHudCache = True if import_options['fastStoreHudCache'] == 'True' else False
else:
saveActions = False
if import_options['fastStoreHudCache'] == 'True':
fastStoreHudCache = True
else:
fastStoreHudCache = False
t0 = time() t0 = time()
fpdb_simple.fillCardArrays(len(names), base, category, card_values, card_suits) fpdb_simple.fillCardArrays(len(names), base, category, card_values, card_suits)
@ -121,14 +110,8 @@ def tourney_holdem_omaha(config, backend, db, cursor, base, category, siteTourne
"""stores a tourney holdem/omaha hand into the database""" """stores a tourney holdem/omaha hand into the database"""
import_options = config.get_import_parameters() import_options = config.get_import_parameters()
if import_options['saveActions'] == 'True': saveActions = True if import_options['saveActions'] == 'True' else False
saveActions = True fastStoreHudCache = True if import_options['fastStoreHudCache'] == 'True' else False
else:
saveActions = False
if import_options['fastStoreHudCache'] == 'True':
fastStoreHudCache = True
else:
fastStoreHudCache = False
fpdb_simple.fillCardArrays(len(names), base, category, card_values, card_suits) fpdb_simple.fillCardArrays(len(names), base, category, card_values, card_suits)
fpdb_simple.fill_board_cards(board_values, board_suits) fpdb_simple.fill_board_cards(board_values, board_suits)
@ -164,14 +147,8 @@ def tourney_stud(config, backend, db, cursor, base, category, siteTourneyNo, buy
#stores a tourney stud/razz hand into the database #stores a tourney stud/razz hand into the database
import_options = config.get_import_parameters() import_options = config.get_import_parameters()
if import_options['saveActions'] == 'True': saveActions = True if import_options['saveActions'] == 'True' else False
saveActions = True fastStoreHudCache = True if import_options['fastStoreHudCache'] == 'True' else False
else:
saveActions = False
if import_options['fastStoreHudCache'] == 'True':
fastStoreHudCache = True
else:
fastStoreHudCache = False
fpdb_simple.fillCardArrays(len(names), base, category, cardValues, cardSuits) fpdb_simple.fillCardArrays(len(names), base, category, cardValues, cardSuits)