Changeset 11654:3c47a792586a in orange for Orange/utils/addons.py


Ignore:
Timestamp:
08/12/13 18:47:14 (8 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Changed the global 'addons_corrupted' flag to a function.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/utils/addons.py

    r11653 r11654  
    6565    return addons 
    6666 
    67 global addons_corrupted 
    68 with closing(open_addons()) as addons: 
    69     addons_corrupted = len(addons)==0 
    70  
    71 del addons 
     67 
     68def addons_corrupted(): 
     69    with closing(open_addons()) as addons: 
     70        return len(addons) == 0 
    7271 
    7372addon_refresh_callback = [] 
     
    119118        readthedocs = None 
    120119 
    121     global addons_corrupted 
    122120    docs = {} 
    123121    if progress_callback: 
     
    154152            if progress_callback: 
    155153                progress_callback(len(pkg_dict)+1, i+2) 
    156         addons_corrupted = False 
    157154 
    158155    rebuild_index() 
Note: See TracChangeset for help on using the changeset viewer.