Changeset 618:d3ac02061d97


Ignore:
Timestamp:
18/05/12 22:53:50 (12 months ago)
Author:
Santiago Piccinini (SAn) <piccinini.santiago@…>
Branch:
default
rebase_source:
1cc3eaf5e5b67c336e43b73189465fc5ba6a20fe
Message:

Fixed cache on themes.py

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cyclope/themes.py

    r592 r598  
    4545def get_default_themes(): 
    4646    global _default_cache 
    47     path = _DEFAULT_THEMES_ROOT 
     47    path = unicode(_DEFAULT_THEMES_ROOT) 
    4848    if _default_cache is None: 
    4949        _default_cache = _get_themes(path) 
     
    5454    if not hasattr(settings, 'CYCLOPE_LOCAL_THEMES_DIR'): 
    5555        return {} 
    56     path = settings.CYCLOPE_LOCAL_THEMES_DIR 
     56    path = unicode(settings.CYCLOPE_LOCAL_THEMES_DIR) 
    5757    if _local_cache is None or not cache: 
    5858        _local_cache = _get_themes(path) 
     
    7676def set_global_cache(): 
    7777    global _GLOBAL_CACHE 
    78     _GLOBAL_CACHE = [True] 
     78    if not _GLOBAL_CACHE: 
     79        _GLOBAL_CACHE.append(True) 
    7980 
    8081def deactivate_global_cache(): 
    8182    global _GLOBAL_CACHE 
    82     _GLOBAL_CACHE = [] 
     83    if _GLOBAL_CACHE: 
     84        _GLOBAL_CACHE.pop() 
    8385 
    8486if hasattr(settings, 'CYCLOPE_LOCAL_THEMES_DIR'): 
Note: See TracChangeset for help on using the changeset viewer.