ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CRAB/python/PsetManipulator.py
(Generate patch)

Comparing COMP/CRAB/python/PsetManipulator.py (file contents):
Revision 1.16 by ewv, Wed Apr 30 17:03:57 2008 UTC vs.
Revision 1.17 by ewv, Wed Apr 30 19:41:29 2008 UTC

# Line 31 | Line 31 | class PsetManipulator:
31              try:   # Nested form for Python < 2.5
32                  try:
33                      self.cfo = imp.load_source("pycfg", self.pset, handle)
34 +                    self.cmsProcess = self.cfo.process
35                  except Exception, ex:
36                      msg = "Your config file is not valid python: %s" % str(ex)
37                      raise CrabException(msg)
38              finally:
39                  handle.close()
39            self.cfg = CfgInterface(self.cfo.process)
40          else:
41              try:
42                  self.cfo = include(self.pset)
43 <                self.cfg = CfgInterface(self.cfo)
43 >                self.cmsProcess = self.cfo
44              except Exception, ex:
45                  msg =  "Your cfg file is not valid, %s\n" % str(ex)
46                  msg += "  https://twiki.cern.ch/twiki/bin/view/CMS/CrabFaq#Problem_with_ParameterSet_parsin\n"
47                  msg += "  may help you understand the problem."
48                  raise CrabException(msg)
49 +        self.cfg = CfgInterface(self.cmsProcess)
50  
51      def maxEvent(self, maxEv):
52          """
# Line 63 | Line 64 | class PsetManipulator:
64          outFile = open(common.work_space.jobDir()+name,"w")
65          if name.endswith('py'):
66            outFile.write("import FWCore.ParameterSet.Config as cms\n")
67 <          outFile.write(self.cfo.dumpPython())
67 >          outFile.write(self.cmsProcess.dumpPython())
68          else:
69            outFile.write(str(self.cfg))
70          outFile.close()

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines