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 42 of file tier0.py.

Constructor & Destructor Documentation

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

Definition at line 44 of file tier0.py.

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

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

Member Function Documentation

def tier0.ResponseError.__str__ (   self)

Definition at line 49 of file tier0.py.

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().

49  def __str__( self ):
50  errStr = """Wrong response for curl connection to Tier0DataSvc from URL \"%s\"""" %( self.args[1].getinfo( self.args[1].EFFECTIVE_URL ), )
51  if self.args[ -1 ]:
52  errStr += """ using proxy \"%s\"""" %( str( self.args[ -1 ] ), )
53  errStr += """ with timeout \"%d\" with error code \"%d\".""" %( self.timeout, self.args[1].getinfo( self.args[1].RESPONSE_CODE) )
54  if self.args[0].find( '<p>' ) != -1:
55  errStr += """\nFull response: \"%s\".""" %( self.args[0].partition('<p>')[-1].rpartition('</p>')[0], )
56  else:
57  errStr += """\nFull response: \"%s\".""" %( self.args[0], )
58  return errStr
59 
60 #TODO: Add exceptions for each category of HTTP error codes
61 #TODO: check response code and raise corresponding exceptions
62 
def __str__(self)
Definition: tier0.py:49
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
#define str(s)

Member Data Documentation

tier0.ResponseError.timeout

Definition at line 47 of file tier0.py.

Referenced by tier0.ResponseError.__str__().