Permalink
Browse files

Added handling for response errors (probably auth error since redis c…

…lient is broken in this regard).
  • Loading branch information...
1 parent 3af9e49 commit 8b9438dc9a9c2b7ee9efe59125b61de840e79e27 @ionelmc committed Nov 4, 2011
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/redisboard/models.py
View
@@ -87,6 +87,15 @@ def stats(self):
'details': {},
'brief_details': {},
}
+ except redis.exceptions.ResponseError, e:
+ return {
+ 'status': 'ERROR: %s' % e.args,
+ 'clients': 'n/a',
+ 'memory': 'n/a',
+ 'details': {},
+ 'brief_details': {},
+ }
+
def __unicode__(self):
return "%s:%s" % (self.hostname, self.port)

0 comments on commit 8b9438d

Please sign in to comment.