Skip to content

Commit

Permalink
Merge pull request #5512 from davidlange6/remove_importlib3
Browse files Browse the repository at this point in the history
remove importlib in favor of python 2.6 solution
  • Loading branch information
davidlange6 committed Sep 23, 2014
2 parents 6fe1903 + c03309a commit b84b8e0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions PhysicsTools/SelectorUtils/python/tools/vid_id_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

from PhysicsTools.SelectorUtils.centralIDRegistry import central_id_registry

import importlib
#keep python2.6 compatibility for computing
#import importlib

#general simple tools for various object types
def setupVIDSelection(vidproducer,cutflow):
Expand All @@ -28,7 +29,8 @@ def addVIDSelectionToPATProducer(patProducer,idProducer,idName):
print '\t--- %s:%s added to %s'%(idProducer,idName,patProducer.label())

def setupAllVIDIdsInModule(process,id_module_name,setupFunction,patProducer=None):
idmod = importlib.import_module(id_module_name)
# idmod = importlib.import_module(id_module_name)
idmod= __import__(id_module_name)
for name in dir(idmod):
item = getattr(idmod,name)
if hasattr(item,'idName') and hasattr(item,'cutFlow'):
Expand Down

0 comments on commit b84b8e0

Please sign in to comment.