CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
tier0.ResponseError Class Reference
Inheritance diagram for tier0.ResponseError:
tier0.Tier0Error Exception

Public Member Functions

def __init__ (self, curl, response, proxy, timeout, maxTime)
 
def __str__ (self)
 
- Public Member Functions inherited from tier0.Tier0Error
def __init__ (self, message)
 

Public Attributes

 maxTime
 
 timeout
 
- Public Attributes inherited from tier0.Tier0Error
 args
 

Detailed Description

Definition at line 42 of file tier0.py.

Constructor & Destructor Documentation

◆ __init__()

def tier0.ResponseError.__init__ (   self,
  curl,
  response,
  proxy,
  timeout,
  maxTime 
)

Definition at line 44 of file tier0.py.

References DMRplotter.DMRplotter.args, tier0.Tier0Error.args, and o2olib.O2OTool.args.

44  def __init__( self, curl, response, proxy, timeout, maxTime ):
45  super( ResponseError, self ).__init__( response )
46  self.args += ( curl, proxy )
47  self.timeout = timeout
48  self.maxTime = maxTime
49 
def __init__(self, dataset, job_number, job_id, job_name, isDA, isMC, applyBOWS, applyEXTRACOND, extraconditions, runboundary, lumilist, intlumi, maxevents, gt, allFromGT, alignmentDB, alignmentTAG, apeDB, apeTAG, bowDB, bowTAG, vertextype, tracktype, refittertype, ttrhtype, applyruncontrol, ptcut, CMSSW_dir, the_dir)

Member Function Documentation

◆ __str__()

def tier0.ResponseError.__str__ (   self)

Definition at line 50 of file tier0.py.

References DMRplotter.DMRplotter.args, tier0.Tier0Error.args, o2olib.O2OTool.args, and l1ctLayer1_patternWriters_cff.partition.

Referenced by edmStreamStallGrapher.Point.__repr__().

50  def __str__(self):
51  errStr = f'Wrong response for curl connection to Tier0DataSvc'\
52  f' from URL "{self.args[1].getinfo(self.args[1].EFFECTIVE_URL)}"'
53  if self.args[-1]:
54  errStr += f' using proxy "{str(self.args[-1])}"'
55  errStr += f' with connection-timeout "{self.timeout}", max-time "{self.maxtime}"'\
56  f' with error code "{self.args[1].getinfo(self.args[1].RESPONSE_CODE)}".'
57  if '<p>' in self.args[0]:
58  full_response = self.args[0].partition('<p>')[-1].rpartition('</p>')[0]
59  errStr += f'\nFull response: "{full_response}".'
60  else:
61  errStr += f'\nFull response: "{self.args[0]}".'
62 
63  return errStr
64 
65 #TODO: Add exceptions for each category of HTTP error codes
66 #TODO: check response code and raise corresponding exceptions
67 #note: this function seems to be unused

Member Data Documentation

◆ maxTime

tier0.ResponseError.maxTime

Definition at line 48 of file tier0.py.

◆ timeout

tier0.ResponseError.timeout

Definition at line 47 of file tier0.py.