diff options
| author | John Anderson <sontek@gmail.com> | 2015-06-19 23:48:49 -0700 |
|---|---|---|
| committer | John Anderson <sontek@gmail.com> | 2015-06-19 23:48:49 -0700 |
| commit | ace2cd339207c9739ef5ee0d4412a930b9bf571c (patch) | |
| tree | e43863ba20d2aca02d36f164cc59dbcf3c2a7433 /pymemcache/serde.py | |
| parent | 5a135c0f72e54f570da69872dc32a2b6c384e2ff (diff) | |
| download | pymemcache-ace2cd339207c9739ef5ee0d4412a930b9bf571c.tar.gz | |
Flake8/pep8 the code
Diffstat (limited to 'pymemcache/serde.py')
| -rw-r--r-- | pymemcache/serde.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pymemcache/serde.py b/pymemcache/serde.py index 0b654b6..c7a00ee 100644 --- a/pymemcache/serde.py +++ b/pymemcache/serde.py @@ -21,9 +21,9 @@ except ImportError: from StringIO import StringIO -FLAG_PICKLE = 1<<0 -FLAG_INTEGER = 1<<1 -FLAG_LONG = 1<<2 +FLAG_PICKLE = 1 << 0 +FLAG_INTEGER = 1 << 1 +FLAG_LONG = 1 << 2 def python_memcache_serializer(key, value): @@ -46,6 +46,7 @@ def python_memcache_serializer(key, value): return value, flags + def python_memcache_deserializer(key, value, flags): if flags == 0: return value @@ -61,7 +62,7 @@ def python_memcache_deserializer(key, value, flags): buf = StringIO(value) unpickler = pickle.Unpickler(buf) return unpickler.load() - except Exception as e: + except Exception: logging.info('Pickle error', exc_info=True) return None |
