forked from redis/redis-py
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pubsub: improve error reporting if caller forgets to subscribe
This is an easy mistake to make -- at least, I keep making it. It formerly resulted in a confusing crash, "AttributeError: 'NoneType' object has no attribute 'can_read'", from parse_response(). I have had to dig into the redis-py source code more than once to figure out what went wrong. With this patch, it still crashes, but with a clearer error that clarifies what the calling code forgot to do. Fixes issue redis#716.
- Loading branch information
Showing
2 changed files
with
12 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters