CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
crabFunctions.CertInfo Class Reference

Public Member Functions

def __init__ (self)
 

Public Attributes

 vo
 
 voGroup
 
 voRole
 

Detailed Description

Definition at line 342 of file crabFunctions.py.

Constructor & Destructor Documentation

def crabFunctions.CertInfo.__init__ (   self)

Definition at line 343 of file crabFunctions.py.

343  def __init__( self ):
344  p = subprocess.Popen("voms-proxy-info --fqan",
345  stdout = subprocess.PIPE,
346  stderr = subprocess.PIPE,
347  shell=True)
348  stdout, stderr = p.communicate()
349  print stdout
350  if p.returncode != 0:
351  self.vo = ""
352  self.voGroup = ""
353  self.voRole = ""
354  else:
355  lines = stdout.split("\n")
356  splitline = lines[0].split("/")
357  if len(splitline) < 4:
358  splitline = lines[1].split("/")
359  self.vo = splitline[1]
360  self.voGroup = splitline[2]
361  try:
362  self.voRole = splitline[2].split("=")[1]
363  if "NULL" in self.voRole:
364  self.voGroup = ""
365  except:
366  self.voRole = ""
367 
double split
Definition: MVATrainer.cc:139

Member Data Documentation

crabFunctions.CertInfo.vo

Definition at line 351 of file crabFunctions.py.

crabFunctions.CertInfo.voGroup

Definition at line 352 of file crabFunctions.py.

crabFunctions.CertInfo.voRole

Definition at line 353 of file crabFunctions.py.