Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug in appadmin cache #1513

Closed
RekGRpth opened this issue Oct 27, 2016 · 2 comments
Closed

bug in appadmin cache #1513

RekGRpth opened this issue Oct 27, 2016 · 2 comments

Comments

@RekGRpth
Copy link

UnboundLocalError: local variable 'value' referenced before assignment

        for key in cache.disk.storage:
            if key == 'web2py_cache_statistics' and isinstance(value[1], dict):
@RekGRpth
Copy link
Author

solve

diff --git a/controllers/appadmin.py b/controllers/appadmin.py
index 73303f5..a602a95 100644
--- a/controllers/appadmin.py
+++ b/controllers/appadmin.py
@@ -465,6 +465,7 @@ def ccache():
             ram['keys'].append((key, GetInHMS(time.time() - value[0])))

         for key in cache.disk.storage:
+            value = cache.disk.storage[key]
             if key == 'web2py_cache_statistics' and isinstance(value[1], dict):
                 disk['hits'] = value[1]['hit_total'] - value[1]['misses']
                 disk['misses'] = value[1]['misses']

@ilvalle
Copy link
Contributor

ilvalle commented Jun 6, 2017

@mdipierro #1555 has been merged, this issue can be close

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

No branches or pull requests

3 participants