cosmetic change to comment
This commit is contained in:
parent
8353d0739b
commit
7f47a753db
|
@ -372,7 +372,10 @@ class Database:
|
||||||
return winners
|
return winners
|
||||||
|
|
||||||
def init_hud_stat_vars(self, hud_days):
|
def init_hud_stat_vars(self, hud_days):
|
||||||
"""Initialise variables used by Hud to fetch stats."""
|
"""Initialise variables used by Hud to fetch stats:
|
||||||
|
self.hand_1day_ago handId of latest hand played more than a day ago
|
||||||
|
self.date_ndays_ago date n days ago
|
||||||
|
"""
|
||||||
|
|
||||||
self.hand_1day_ago = 1
|
self.hand_1day_ago = 1
|
||||||
try:
|
try:
|
||||||
|
@ -385,9 +388,10 @@ class Database:
|
||||||
else:
|
else:
|
||||||
if row and row[0]:
|
if row and row[0]:
|
||||||
self.hand_1_day_ago = row[0]
|
self.hand_1_day_ago = row[0]
|
||||||
d = timedelta(days=hud_days)
|
|
||||||
now = datetime.utcnow() - d
|
d = timedelta(days=hud_days)
|
||||||
self.date_ndays_ago = "d%02d%02d%02d" % (now.year - 2000, now.month, now.day)
|
now = datetime.utcnow() - d
|
||||||
|
self.date_ndays_ago = "d%02d%02d%02d" % (now.year - 2000, now.month, now.day)
|
||||||
|
|
||||||
def init_player_hud_stat_vars(self, playerid):
|
def init_player_hud_stat_vars(self, playerid):
|
||||||
# not sure if this is workable, to be continued ...
|
# not sure if this is workable, to be continued ...
|
||||||
|
|
Loading…
Reference in New Issue
Block a user