CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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__
 
def __str__
 
- Public Member Functions inherited from tier0.Tier0Error
def __init__
 

Public Attributes

 timeout
 
- Public Attributes inherited from tier0.Tier0Error
 args
 

Detailed Description

Definition at line 41 of file tier0.py.

Constructor & Destructor Documentation

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

Definition at line 43 of file tier0.py.

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

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

Member Function Documentation

def tier0.ResponseError.__str__ (   self)

Definition at line 48 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().

48 
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 
#TODO: Add exceptions for each category of HTTP error codes
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
#define str(s)

Member Data Documentation

tier0.ResponseError.timeout

Definition at line 46 of file tier0.py.

Referenced by tier0.ResponseError.__str__().