Changeset 10453:bb5611565c9d in orange


Ignore:
Timestamp:
03/07/12 11:30:03 (2 years ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Add 'Orange.version.version' to cachedWidgetDescription version (fixes #1120).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeCanvas/orngRegistry.py

    r9671 r10453  
    3535    
    3636def readCategories(silent=False): 
    37     currentCacheVersion = 2 
     37    try: 
     38        from Orange.version import version as orange_version 
     39    except ImportError: 
     40        # Orange.version module is writen by setup.py, what if orange was build 
     41        # using make 
     42        orange_version = "???" 
     43    # Add orange version to the cache version (because cache contains names 
     44    # of types inside the Orange hierarchy, if that changes the cache should be 
     45    # invalidated) 
     46    currentCacheVersion = (2, orange_version) 
    3847     
    3948    global widgetsWithError, widgetsWithErrorPrototypes 
     
    5463        else: 
    5564            cachedWidgetDescriptions = {} 
    56     except: 
     65    except Exception: 
    5766        cachedWidgetDescriptions = {}  
    5867 
Note: See TracChangeset for help on using the changeset viewer.