File: python-memcached-syntax-warnings.patch

package info (click to toggle)
guix 1.4.0-9
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 161,500 kB
  • sloc: lisp: 861,023; cpp: 10,741; javascript: 9,632; sh: 8,913; makefile: 951; ansic: 558; python: 129; sql: 33; sed: 16
file content (24 lines) | stat: -rw-r--r-- 701 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Problem reported upstream:
https://github.com/linsomniac/python-memcached/issues/176

---
 memcache.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/memcache.py b/memcache.py
index 05b6657..b935681 100644
--- a/memcache.py
+++ b/memcache.py
@@ -1300,8 +1300,8 @@ class Client(threading.local):
             key = key[1]
         if key is None:
             raise Client.MemcachedKeyNoneError("Key is None")
-        if key is '':
-            if key_extra_len is 0:
+        if key == '':
+            if key_extra_len == 0:
                 raise Client.MemcachedKeyNoneError("Key is empty")

             #  key is empty but there is some other component to key
--
2.26.2