cosmetic change to comment

This commit is contained in:
sqlcoder 2009-09-27 21:21:26 +01:00
parent 8353d0739b
commit 7f47a753db

View File

@ -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,6 +388,7 @@ 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) d = timedelta(days=hud_days)
now = datetime.utcnow() - d now = datetime.utcnow() - d
self.date_ndays_ago = "d%02d%02d%02d" % (now.year - 2000, now.month, now.day) self.date_ndays_ago = "d%02d%02d%02d" % (now.year - 2000, now.month, now.day)