diff options
author | Roman Haritonov <reclosedev@gmail.com> | 2013-02-02 10:41:28 +0400 |
---|---|---|
committer | Roman Haritonov <reclosedev@gmail.com> | 2013-02-02 10:41:28 +0400 |
commit | 4b7f3c0ca0e5750d5c1894e40168cdb2045c36e3 (patch) | |
tree | 2e3899a123f67d0cf0575b1ff15593caeef2770e | |
parent | a1dd3a3438e84a062594bb68e767b6043e33ebeb (diff) | |
download | requests-cache-4b7f3c0ca0e5750d5c1894e40168cdb2045c36e3.tar.gz |
cleanup
-rw-r--r-- | requests_cache/backends/base.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/requests_cache/backends/base.py b/requests_cache/backends/base.py index 306aab4..16f86a5 100644 --- a/requests_cache/backends/base.py +++ b/requests_cache/backends/base.py @@ -21,7 +21,7 @@ class BaseCache(object): To extend it you can provide dictionary-like objects for :attr:`keys_map` and :attr:`responses` or override public methods. """ - def __init__(self, location='memory', *args, **kwargs): + def __init__(self, *args, **kwargs): #: `key` -> `key_in_responses` mapping self.keys_map = {} #: `key_in_cache` -> `response` mapping @@ -150,8 +150,6 @@ class _Store(object): def _to_bytes(s, encoding='utf-8'): - if is_py2: - return s - if isinstance(s, bytes): + if is_py2 or isinstance(s, bytes): return s return bytes(s, encoding)
\ No newline at end of file |