Skip to content
Browse files

fix for #322

  • Loading branch information...
1 parent 308cf9c commit 11da7641b961f5b15411bccc0eb21cd849dbbd71 andy committed
Showing with 8 additions and 5 deletions.
  1. +4 −5 redis/client.py
  2. +4 −0 tests/server_commands.py
View
9 redis/client.py
@@ -99,7 +99,7 @@ def get_value(value):
sub_dict = {}
for item in value.split(','):
k, v = item.rsplit('=', 1)
- sub_dict[k] = get_value(v)
+ sub_dict[k] = get_value(v)
return sub_dict
for line in response.splitlines():
@@ -219,7 +219,6 @@ class StrictRedis(object):
lambda r: nativestr(r) == 'Background rewriting of AOF file started'
),
'BGSAVE': lambda r: nativestr(r) == 'Background saving started',
- 'BRPOPLPUSH': lambda r: r and r or None,
'CLIENT': parse_client,
'CONFIG': parse_config,
'DEBUG': parse_debug_object,
@@ -445,10 +444,10 @@ def flushdb(self):
def info(self, section=None):
"""
Returns a dictionary containing information about the Redis server
-
- The ``section`` option can be used to select a specific section
+
+ The ``section`` option can be used to select a specific section
of information
-
+
The section option is not supported by older versions of Redis Server,
and will generate ResponseError
"""
View
4 tests/server_commands.py
@@ -549,6 +549,10 @@ def test_brpoplpush(self):
self.client.lrange('b', 0, -1),
[b('1'), b('2'), b('3'), b('4')])
+ def test_brpoplpush_empty_string(self):
+ self.client.lpush('a', '')
+ self.assertEquals(self.client.brpoplpush('a', 'b'), b(''))
+
def test_lindex(self):
# no key
self.assertEquals(self.client.lindex('a', '0'), None)

0 comments on commit 11da764

Please sign in to comment.
Something went wrong with that request. Please try again.