Changeset a2a1c20 in sasview for src/sas


Ignore:
Timestamp:
Aug 31, 2017 2:25:38 PM (7 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
b39d32d5
Parents:
28b7048
Message:

make pkg_resources optional

Location:
src/sas
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/sas/logger_config.py

    r7c105e8 ra2a1c20  
    55import os 
    66import os.path 
    7  
    8 import pkg_resources 
    97 
    108 
     
    7169        # NotImplementedError: resource_filename() only supported for .egg, not .zip 
    7270        try: 
     71            import pkg_resources 
    7372            places_to_look_for_conf_file.append( 
    7473                pkg_resources.resource_filename(__name__, filename)) 
     74        except ImportError: 
     75            pass 
    7576        except NotImplementedError: 
    7677            pass 
  • src/sas/sasgui/plottools/config.py

    rd7bb526 ra2a1c20  
    3838    import pkg_resources 
    3939    pkg_resources.require("matplotlib>=" + plot_version) 
    40 except: 
     40except ImportError: 
    4141    from distutils.version import LooseVersion as Version 
    4242    if Version(matplotlib.__version__) < Version(plot_version): 
Note: See TracChangeset for help on using the changeset viewer.