Skip to content

Conversation

@heavenshell
Copy link

@heavenshell heavenshell commented Oct 27, 2017

I'm sorry. I missed PR.

opapy and others added 24 commits May 10, 2017 18:40
When pymemcache server does not found at
`client = self._get_client(key)`.

current implementation returns `{'key': False}`.
But this return value would raise following exception.

```
  File "/tmp/app/lib/python3.6/site-packages/cachalot/monkey_patch.py", line 85, in inner
    cache_key, table_cache_keys)
  File "/tmp/app/lib/python3.6/site-packages/cachalot/monkey_patch.py", line 51, in _get_result_or_execute_query
    timestamp, result = data.pop(cache_key)
TypeError: 'bool' object is not iterable
```

https://github.com/BertrandBordage/django-cachalot/blob/master/cachalot/monkey_patch.py#L39-L45

So, this patch ignore if server does not found, just return `{}` to
avoid raise TypeError.
@heavenshell
Copy link
Author

sorry miss

@heavenshell heavenshell deleted the fix/cachalot_compat branch October 27, 2017 14:18
@heavenshell heavenshell restored the fix/cachalot_compat branch October 27, 2017 14:18
@heavenshell heavenshell deleted the fix/cachalot_compat branch October 30, 2017 05:55
matteiuspi pushed a commit to CashStar/django-elasticache that referenced this pull request Mar 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants