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 207 of file upload_popcon.py.

Constructor & Destructor Documentation

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

Definition at line 214 of file upload_popcon.py.

215  def __init__(self, code, response):
216  self.code = code
217  self.response = response
218 
219  # Try to extract the error message if possible (i.e. known error page format)
220  try:
221  self.args = (response.split('<p>')[1].split('</p>')[0], )
222  except Exception:
223  self.args = (self.response, )
224 
double split
Definition: MVATrainer.cc:139

Member Data Documentation

upload_popcon.HTTPError.args

Definition at line 220 of file upload_popcon.py.

upload_popcon.HTTPError.code

Definition at line 215 of file upload_popcon.py.

upload_popcon.HTTPError.response

Definition at line 216 of file upload_popcon.py.