Merge branch 'master' of git://git.assembla.com/fpdb-sql
This commit is contained in:
commit
e0a125faf0
|
@ -243,7 +243,17 @@ class GuiBulkImport():
|
||||||
|
|
||||||
# ComboBox - filter
|
# ComboBox - filter
|
||||||
self.cbfilter = gtk.combo_box_new_text()
|
self.cbfilter = gtk.combo_box_new_text()
|
||||||
|
disabled_sites = [] # move disabled sites to bottom of list
|
||||||
for w in self.config.hhcs:
|
for w in self.config.hhcs:
|
||||||
|
try:
|
||||||
|
if self.config.supported_sites[w].enabled: # include enabled ones first
|
||||||
|
print w
|
||||||
|
self.cbfilter.append_text(w)
|
||||||
|
else:
|
||||||
|
disabled_sites.append(w)
|
||||||
|
except: # self.supported_sites[w] may not exist if hud_config is bad
|
||||||
|
disabled_sites.append(w)
|
||||||
|
for w in disabled_sites: # then disabled ones
|
||||||
print w
|
print w
|
||||||
self.cbfilter.append_text(w)
|
self.cbfilter.append_text(w)
|
||||||
self.cbfilter.set_active(0)
|
self.cbfilter.set_active(0)
|
||||||
|
|
|
@ -245,10 +245,6 @@ class HUD_main(object):
|
||||||
,self.hero_ids[site_id], num_seats)
|
,self.hero_ids[site_id], num_seats)
|
||||||
t3 = time.time()
|
t3 = time.time()
|
||||||
try:
|
try:
|
||||||
self.db_connection.init_hud_stat_vars( self.hud_dict[temp_key].hud_params['hud_days']
|
|
||||||
, self.hud_dict[temp_key].hud_params['h_hud_days'])
|
|
||||||
t4 = time.time()
|
|
||||||
stat_dict = self.db_connection.get_stats_from_hand(new_hand_id, type, self.hud_dict[temp_key].hud_params, self.hero_ids[site_id])
|
|
||||||
self.hud_dict[temp_key].stat_dict = stat_dict
|
self.hud_dict[temp_key].stat_dict = stat_dict
|
||||||
except KeyError: # HUD instance has been killed off, key is stale
|
except KeyError: # HUD instance has been killed off, key is stale
|
||||||
sys.stderr.write('hud_dict[%s] was not found\n' % temp_key)
|
sys.stderr.write('hud_dict[%s] was not found\n' % temp_key)
|
||||||
|
@ -256,9 +252,10 @@ class HUD_main(object):
|
||||||
# Unlocks table, copied from end of function
|
# Unlocks table, copied from end of function
|
||||||
self.db_connection.connection.rollback()
|
self.db_connection.connection.rollback()
|
||||||
return
|
return
|
||||||
t5 = time.time()
|
|
||||||
cards = self.db_connection.get_cards(new_hand_id)
|
cards = self.db_connection.get_cards(new_hand_id)
|
||||||
|
t4 = time.time()
|
||||||
comm_cards = self.db_connection.get_common_cards(new_hand_id)
|
comm_cards = self.db_connection.get_common_cards(new_hand_id)
|
||||||
|
t5 = time.time()
|
||||||
if comm_cards != {}: # stud!
|
if comm_cards != {}: # stud!
|
||||||
cards['common'] = comm_cards['common']
|
cards['common'] = comm_cards['common']
|
||||||
self.hud_dict[temp_key].cards = cards
|
self.hud_dict[temp_key].cards = cards
|
||||||
|
|
Loading…
Reference in New Issue
Block a user