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)
 
def __str__ (self)
 
- Public Member Functions inherited from tier0.Tier0Error
def __init__ (self, message)
 

Public Attributes

 timeout
 
- Public Attributes inherited from tier0.Tier0Error
 args
 

Detailed Description

Definition at line 41 of file tier0.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 43 of file tier0.py.

43  def __init__( self, curl, response, proxy, timeout ):
44  super( ResponseError, self ).__init__( response )
45  self.args += ( curl, proxy )
46  self.timeout = timeout
47 

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

Member Function Documentation

◆ __str__()

def tier0.ResponseError.__str__ (   self)

Definition at line 48 of file tier0.py.

48  def __str__( self ):
49  errStr = """Wrong response for curl connection to Tier0DataSvc from URL \"%s\"""" %( self.args[1].getinfo( self.args[1].EFFECTIVE_URL ), )
50  if self.args[ -1 ]:
51  errStr += """ using proxy \"%s\"""" %( str( self.args[ -1 ] ), )
52  errStr += """ with timeout \"%d\" with error code \"%d\".""" %( self.timeout, self.args[1].getinfo( self.args[1].RESPONSE_CODE) )
53  if self.args[0].find( '<p>' ) != -1:
54  errStr += """\nFull response: \"%s\".""" %( self.args[0].partition('<p>')[-1].rpartition('</p>')[0], )
55  else:
56  errStr += """\nFull response: \"%s\".""" %( self.args[0], )
57  return errStr
58 
59 #TODO: Add exceptions for each category of HTTP error codes
60 #TODO: check response code and raise corresponding exceptions
61 

References tier0.Tier0Error.args, o2olib.O2OTool.args, spr.find(), str, and tier0.ResponseError.timeout.

Referenced by edmStreamStallGrapher.Point.__repr__(), BeautifulSoup.Tag.__repr__(), BeautifulSoup.Tag.__unicode__(), and BeautifulSoup.Tag.prettify().

Member Data Documentation

◆ timeout

tier0.ResponseError.timeout

Definition at line 46 of file tier0.py.

Referenced by tier0.ResponseError.__str__().

spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
str
#define str(s)
Definition: TestProcessor.cc:48
TriggerAnalyzer.__str__
def __str__(self)
Definition: TriggerAnalyzer.py:103