Skip to content

Commit f2bfb80

Browse files
committed
fixed a bug
1 parent 1ef5831 commit f2bfb80

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/dataprovider/redisprovider.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,11 @@ def get_command_stats(self, server, from_date, to_date, group_by):
199199

200200
# get the count.
201201
try:
202-
count = counts[x]
203-
except IndexError as e:
202+
if counts[x] is not None:
203+
count = int(counts[x])
204+
else:
205+
count = 0
206+
except Exception as e:
204207
count = 0
205208

206209
# convert the timestamp

0 commit comments

Comments
 (0)