CMS 3D CMS Logo

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__ (self, dataset, user, options)
 
def run (self, input)
 
- Public Member Functions inherited from production_tasks.Task
def __init__ (self, name, dataset, user, options, instance=None)
 
def addOption (self, parser)
 
def getname (self)
 
def run (self, input)
 

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 419 of file production_tasks.py.

Constructor & Destructor Documentation

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

Definition at line 421 of file production_tasks.py.

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

Member Function Documentation

def production_tasks.CheckConfig.run (   self,
  input 
)

Definition at line 423 of file production_tasks.py.

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