2 |
|
import traceback |
3 |
|
import common |
4 |
|
from crab_exceptions import * |
5 |
– |
from crab_logger import Logger |
5 |
|
|
6 |
|
|
7 |
|
class ValidateCfg: |
25 |
|
""" |
26 |
|
Read in Pset object |
27 |
|
""" |
28 |
< |
common.logger.message( "Importing file %s"%self.pset) |
28 |
> |
common.logger.info( "Importing file %s"%self.pset) |
29 |
|
handle = open(self.pset, 'r') |
30 |
|
|
31 |
|
try: |
46 |
|
""" |
47 |
|
cmsProcess = self.ImportFile() |
48 |
|
|
49 |
< |
common.logger.message( 'Starting the dump.....' ) |
49 |
> |
common.logger.info( 'Starting the dump.....' ) |
50 |
|
try: |
51 |
|
cmsProcess.dumpPython() |
52 |
|
except Exception, ex: |
56 |
|
"information doesn't help solve this problem." |
57 |
|
raise CrabException( msg ) |
58 |
|
msg = "Python parsing succeeded. File is valid.\n" |
59 |
< |
common.logger.message( msg ) |
59 |
> |
common.logger.info( msg ) |
60 |
|
|
61 |
|
def IncludePset(self): |
62 |
|
""" |
63 |
|
""" |
64 |
|
from FWCore.ParameterSet.Config import include |
65 |
< |
common.logger.message( 'Starting include.....' ) |
65 |
> |
common.logger.info( 'Starting include.....' ) |
66 |
|
try: |
67 |
|
cfo = include(self.pset) |
68 |
|
except Exception, ex: |
72 |
|
"information doesn't help solve this problem." |
73 |
|
raise CrabException(msg) |
74 |
|
msg = "Python parsing succeeded. File is valid.\n" |
75 |
< |
common.logger.message( msg ) |
75 |
> |
common.logger.info( msg ) |
76 |
|
|
77 |
|
|
78 |
|
if __name__ == '__main__' : |