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

Constructor & Destructor Documentation

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

Definition at line 51 of file upload_popcon.py.

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

Member Data Documentation

upload_popcon.HTTPError.args

Definition at line 57 of file upload_popcon.py.

upload_popcon.HTTPError.code

Definition at line 52 of file upload_popcon.py.

upload_popcon.HTTPError.response

Definition at line 53 of file upload_popcon.py.