CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
upload_popcon.HTTPError Class Reference
Inheritance diagram for upload_popcon.HTTPError:
Exception

Public Member Functions

def __init__
 

Public Attributes

 args
 
 code
 
 response
 

Detailed Description

A common HTTP exception.

self.code is the response HTTP code as an integer.
self.response is the response body (i.e. page).

Definition at line 43 of file upload_popcon.py.

Constructor & Destructor Documentation

def upload_popcon.HTTPError.__init__ (   self,
  code,
  response 
)

Definition at line 50 of file upload_popcon.py.

50 
51  def __init__(self, code, response):
52  self.code = code
53  self.response = response
54 
55  # Try to extract the error message if possible (i.e. known error page format)
56  try:
57  self.args = (response.split('<p>')[1].split('</p>')[0], )
58  except Exception:
59  self.args = (self.response, )
60 
double split
Definition: MVATrainer.cc:139

Member Data Documentation

upload_popcon.HTTPError.args

Definition at line 56 of file upload_popcon.py.

upload_popcon.HTTPError.code

Definition at line 51 of file upload_popcon.py.

Referenced by rrapi.RRApiError.__init__().

upload_popcon.HTTPError.response

Definition at line 52 of file upload_popcon.py.