summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy McCurdy <andy@andymccurdy.com>2019-12-29 14:16:15 -0800
committerAndy McCurdy <andy@andymccurdy.com>2019-12-29 14:16:15 -0800
commita9ef0fe200507480ad721e6cc1520fef74f4d396 (patch)
treeed3e97cfc43e38c44de75a775a18160941511be6
parentdca7bd40a3a5d0c0853fe2befe706e214407697b (diff)
downloadredis-py-a9ef0fe200507480ad721e6cc1520fef74f4d396.tar.gz
more accurate description of acceptable argument types
fixes #1214
-rwxr-xr-xredis/connection.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/redis/connection.py b/redis/connection.py
index 9a0e12d..85d5c30 100755
--- a/redis/connection.py
+++ b/redis/connection.py
@@ -106,7 +106,7 @@ class Encoder(object):
elif isinstance(value, bool):
# special case bool since it is a subclass of int
raise DataError("Invalid input of type: 'bool'. Convert to a "
- "byte, string or number first.")
+ "bytes, string, int or float first.")
elif isinstance(value, float):
value = repr(value).encode()
elif isinstance(value, (int, long)):
@@ -116,7 +116,7 @@ class Encoder(object):
# a value we don't know how to deal with. throw an error
typename = type(value).__name__
raise DataError("Invalid input of type: '%s'. Convert to a "
- "byte, string or number first." % typename)
+ "bytes, string, int or float first." % typename)
if isinstance(value, unicode):
value = value.encode(self.encoding, self.encoding_errors)
return value