CMS 3D CMS Logo

List of all members | Public Member Functions
production_tasks.CleanFiles Class Reference
Inheritance diagram for production_tasks.CleanFiles:
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

Remove a list of files

Definition at line 196 of file production_tasks.py.

Constructor & Destructor Documentation

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

Definition at line 198 of file production_tasks.py.

198  def __init__(self, dataset, user, options):
199  Task.__init__(self,'CleanFiles', dataset, user, options)
def __init__(self, dataset, user, options)

Member Function Documentation

def production_tasks.CleanFiles.run (   self,
  input 
)

Definition at line 200 of file production_tasks.py.

200  def run(self, input):
201  files = input['FilesToClean']['Files']
202  removed = []
203  for f in files:
204  if f is None or not f: continue
205  if os.path.exists(f): os.remove(f)
206  removed.append(f)
207  return {'CleanedFiles':removed}
208