Commit 71176fc andy
committed
1 parent 44e9c7b commit 71176fc Copy full SHA for 71176fc
File tree 2 files changed +17
-4
lines changed
2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change 1
- * 2.8.0 (in development)
1
+ * 2.7.6
2
2
* Added CONFIG RESETSTAT command. Thanks Yossi Gottlieb.
3
3
* Fixed a bug introduced in 2.7.3 that caused issues with script objects
4
4
and pipelines. Thanks Carpentier Pierre-Francois.
5
5
* Converted redis-py's test suite to use the awesome py.test library.
6
+ * Fixed a bug introduced in 2.7.5 that prevented a ConnectionError from
7
+ being raised when the Redis server is LOADING data.
8
+ * Added a BusyLoadingError exception that's raised when the Redis server
9
+ is starting up and not accepting commands yet. BusyLoadingError
10
+ subclasses ConnectionError, which this state previously returned.
11
+ Thanks Yossi Gottlieb.
6
12
* 2.7.5
7
13
* DEL, HDEL and ZREM commands now return the numbers of keys deleted
8
14
instead of just True/False.
Original file line number Diff line number Diff line change @@ -113,9 +113,16 @@ def read_response(self):
113
113
# server returned an error
114
114
if byte == '-' :
115
115
response = nativestr (response )
116
- # *return*, not raise the exception class. if it is meant to be
117
- # raised, it will be at a higher level.
118
- return self .parse_error (response )
116
+ error = self .parse_error (response )
117
+ # if the error is a ConnectionError, raise immediately so the user
118
+ # is notified
119
+ if isinstance (error , ConnectionError ):
120
+ raise error
121
+ # otherwise, we're dealing with a ResponseError that might belong
122
+ # inside a pipeline response. the connection's read_response()
123
+ # and/or the pipeline's execute() will raise this error if
124
+ # necessary, so just return the exception instance here.
125
+ return error
119
126
# single value
120
127
elif byte == '+' :
121
128
pass
You can’t perform that action at this time.
0 commit comments