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.18.2.1 by fanzago, Tue Jun 24 13:54:11 2008 UTC vs.
Revision 1.23 by slacapra, Thu Nov 6 17:51:43 2008 UTC

# Line 43 | Line 43 | class PsetManipulator:
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"
46 >                msg += "  https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideCrabFaq#Problem_with_ParameterSet_parsin\n"
47                  msg += "  may help you understand the problem."
48                  raise CrabException(msg)
49          self.cfg = CfgInterface(self.cmsProcess)
# Line 64 | 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.cmsProcess.dumpPython())
67 >            try:
68 >                outFile.write(self.cmsProcess.dumpPython())
69 >            except Exception, ex:
70 >                msg =  "Your cfg file is not valid, %s\n" % str(ex)
71 >                msg += "  https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideCrabFaq#Problem_with_ParameterSet_parsin\n"
72 >                msg += "  may help you understand the problem."
73 >                raise CrabException(msg)
74 >
75          else:
76 <            outFile.write(str(self.cfg))
76 >            outFile.write(self.cfg.data.dumpConfig())
77          outFile.close()
78  
79          return
# Line 107 | Line 114 | class PsetManipulator:
114              fileName = getattr(tFileService,'fileName',None).value()
115              return fileName
116          return None
117 <        
117 >
118      def getPoolOutputModule(self):
119          """ Get Output filename from PoolOutputModule and return it. If not existing, return None """
120          if not self.cfg.data.outputModules:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines