Changeset 10879:1707c807d6f4 in orange for Orange/__init__.py


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

Handle all exceptions when entry_points loading fails.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/__init__.py

    r10827 r10879  
    4343        except ImportError, err: 
    4444            warnings.warn("Importing add-on '%s' failed: %s" % (entry_point.name, err), UserWarning, 2) 
     45        except pkg_resources.DistributionNotFound, err: 
     46            warnings.warn("Loading add-on '%s' failed because of a missing dependency: '%s'" % (entry_point.name, err), UserWarning, 2) 
     47        except Exception, err: 
     48            warning.warn("An exception occurred during the loading of '%s':\n%r" %(entry_point.name, err), UserWarning, 2) 
     49 
    4550 
    4651_import("utils") 
Note: See TracChangeset for help on using the changeset viewer.