diff options
author | hofmockel <dreagonfly@gmx.de> | 2013-04-19 13:09:45 +0200 |
---|---|---|
committer | hofmockel <dreagonfly@gmx.de> | 2013-04-19 13:09:45 +0200 |
commit | 99e10b1f4f789d7ad1ddbad7369225f88fc3974d (patch) | |
tree | f08d80af4c2a1ec1334db8a35466cb9d2d183ae7 | |
parent | 01237e9efacf0f46fdf1adce502db152085fd7c1 (diff) | |
download | redis-py-99e10b1f4f789d7ad1ddbad7369225f88fc3974d.tar.gz |
Add python3 and python2.5 compatibility
-rw-r--r-- | redis/client.py | 4 | ||||
-rw-r--r-- | tests/pipeline.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/redis/client.py b/redis/client.py index e135776..b3b6f0f 100644 --- a/redis/client.py +++ b/redis/client.py @@ -1787,8 +1787,8 @@ class BasePipeline(object): try: response.append( self.parse_response(connection, args[0], **options)) - except ResponseError as error: - response.append(error) + except ResponseError: + response.append(sys.exc_info()[1]) if raise_on_error: self.raise_first_error(response) diff --git a/tests/pipeline.py b/tests/pipeline.py index 2f8967c..f517a31 100644 --- a/tests/pipeline.py +++ b/tests/pipeline.py @@ -198,4 +198,4 @@ class PipelineTestCase(unittest.TestCase): raise ret = self.client.hgetall('x') - self.assertEquals(ret, {'a': 'b'}) + self.assertEqual(ret, {b('a'): b('b')}) |