summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Gordon <jogo@users.noreply.github.com>2019-05-07 13:14:39 -0700
committerGitHub <noreply@github.com>2019-05-07 13:14:39 -0700
commitad0d186ea0b4f78cad7771f184c346c14ccb6088 (patch)
treed0d7f8444134ec51ae40d765f169664336f2e4f2
parente585ad126e3b4fa0635ddf207ca4aba7a6ca0ee2 (diff)
parentb2d281e6c6d03aca41d1bd36e7136827f5435c0d (diff)
downloadpymemcache-ad0d186ea0b4f78cad7771f184c346c14ccb6088.tar.gz
Merge pull request #228 from jparise/repr-quotes
Remove redundant '' from %r values
-rw-r--r--pymemcache/client/base.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/pymemcache/client/base.py b/pymemcache/client/base.py
index 4728ea2..7d67bdf 100644
--- a/pymemcache/client/base.py
+++ b/pymemcache/client/base.py
@@ -93,18 +93,18 @@ def _check_key(key, allow_unicode_keys, key_prefix=b''):
else:
key = key.encode('ascii')
except (UnicodeEncodeError, UnicodeDecodeError):
- raise MemcacheIllegalInputError("Non-ASCII key: '%r'" % key)
+ raise MemcacheIllegalInputError("Non-ASCII key: %r" % key)
key = key_prefix + key
parts = key.split()
if len(key) > 250:
- raise MemcacheIllegalInputError("Key is too long: '%r'" % key)
+ raise MemcacheIllegalInputError("Key is too long: %r" % key)
# second statement catches leading or trailing whitespace
elif len(parts) > 1 or parts[0] != key:
- raise MemcacheIllegalInputError("Key contains whitespace: '%r'" % key)
+ raise MemcacheIllegalInputError("Key contains whitespace: %r" % key)
elif b'\00' in key:
- raise MemcacheIllegalInputError("Key contains null: '%r'" % key)
+ raise MemcacheIllegalInputError("Key contains null: %r" % key)
return key