CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
production_tasks.CheckConfig Class Reference
Inheritance diagram for production_tasks.CheckConfig:
production_tasks.Task

Public Member Functions

def __init__
 
def run
 
- Public Member Functions inherited from production_tasks.Task
def __init__
 
def addOption
 
def getname
 
def run
 

Additional Inherited Members

- Public Attributes inherited from production_tasks.Task
 dataset
 
 instance
 
 name
 
 options
 
 user
 

Detailed Description

Check the basic syntax of a CFG file by running python on it.

Definition at line 415 of file production_tasks.py.

Constructor & Destructor Documentation

def production_tasks.CheckConfig.__init__ (   self,
  dataset,
  user,
  options 
)

Definition at line 417 of file production_tasks.py.

418  def __init__(self, dataset, user, options):
Task.__init__(self,'CheckConfig', dataset, user, options)

Member Function Documentation

def production_tasks.CheckConfig.run (   self,
  input 
)

Definition at line 419 of file production_tasks.py.

420  def run(self, input):
421 
422  full = input['FullCFG']['FullCFG']
423 
424  child = subprocess.Popen(['python',full], stdout=subprocess.PIPE,stderr=subprocess.PIPE)
425  stdout, stderr = child.communicate()
426  if child.returncode != 0:
427  raise Exception("Syntax check of cfg failed. Error was '%s'. (%i)" % (stderr,child.returncode))
428  return {'Status':'VALID'}