Skip to content

Commit

Permalink
fix for python2.6 migration
Browse files Browse the repository at this point in the history
  • Loading branch information
Benedikt Hegner committed Nov 12, 2009
1 parent 80ba29a commit 6594d68
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Configuration/PyReleaseValidation/python/ConfigBuilder.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#! /usr/bin/env python


__version__ = "$Revision: 1.152 $"
__version__ = "$Revision: 1.153 $"
__source__ = "$Source: /cvs_server/repositories/CMSSW/CMSSW/Configuration/PyReleaseValidation/python/ConfigBuilder.py,v $"

import FWCore.ParameterSet.Config as cms
Expand Down Expand Up @@ -310,8 +310,9 @@ def addCustomise(self):
"""Include the customise code """

# let python search for that package and do syntax checking at the same time
packageName = self._options.customisation_file.replace(".py","").replace(".","/")
package = __import__(packageName)
packageName = self._options.customisation_file.replace(".py","").replace("/",".")
__import__(packageName)
package = sys.modules[packageName]

# now ask the package for its definition and pick .py instead of .pyc
customiseFile = package.__file__.rstrip("c")
Expand Down Expand Up @@ -813,7 +814,7 @@ def prepare_FASTSIM(self, sequence = "all"):
def build_production_info(self, evt_type, evtnumber):
""" Add useful info for the production. """
prod_info=cms.untracked.PSet\
(version=cms.untracked.string("$Revision: 1.152 $"),
(version=cms.untracked.string("$Revision: 1.153 $"),
name=cms.untracked.string("PyReleaseValidation"),
annotation=cms.untracked.string(evt_type+ " nevts:"+str(evtnumber))
)
Expand Down

0 comments on commit 6594d68

Please sign in to comment.