Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
La Quadrature du Net
rpteam
wantzel
Commits
1c407ea5
Commit
1c407ea5
authored
Feb 16, 2016
by
Mindiell
Browse files
Issue
#17
: When there are no stat, the line is simply not displayed.
parent
9afc96ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
wantzel.py
View file @
1c407ea5
...
...
@@ -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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment