Permalink
Browse files

Merge pull request #10 from streeter/patch-1

Handle the case where no stats are sent
  • Loading branch information...
2 parents 79304f8 + a5d7e19 commit 760bc48939d7908a2db0455d78029a05340ae31c @andymckay andymckay committed Sep 5, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 django_statsd/panel.py
View
@@ -23,6 +23,9 @@ def munge(stats):
def times(stats):
results = []
+ if not stats:
+ return results
+
start = stats[0][1]
end = max([t[3] for t in stats])
length = end - start

0 comments on commit 760bc48

Please sign in to comment.