Commit 1c407ea5 authored by Mindiell's avatar Mindiell

Issue #17: When there are no stat, the line is simply not displayed.

parent 9afc96ab
......@@ -363,7 +363,7 @@ class Wantzel(object):
result = ""
for note in notes:
notnull = 0
result = result + "note>=%s: " % note
period_result = ""
for period in periods:
cursor.execute(
"""SELECT COUNT(id) AS cid FROM presse
......@@ -374,11 +374,11 @@ class Wantzel(object):
)
rows = cursor.fetchall()
if rows[0][0] > 0:
result = result + "%sj:%s, " % (period, rows[0][0])
period_result = period_result + "%sj:%s, " % (period, rows[0][0])
notnull = 1
somethingatall = 1
if notnull:
result = result[:-2] + "\n"
result = result + "note>=%s: " % note + period_result[:-2] + "\n"
if somethingatall == 0:
result = messages["stats_bravo"] % periods[-1]
self.send_message(channel, result)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment