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
uploadConditions.HTTPError Class Reference
Inheritance diagram for uploadConditions.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 200 of file uploadConditions.py.

Constructor & Destructor Documentation

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

Definition at line 207 of file uploadConditions.py.

208  def __init__(self, code, response):
209  self.code = code
210  self.response = response
211 
212  # Try to extract the error message if possible (i.e. known error page format)
213  try:
214  self.args = (response.split('<p>')[1].split('</p>')[0], )
215  except Exception:
216  self.args = (self.response, )
217 

Member Data Documentation

uploadConditions.HTTPError.args

Definition at line 213 of file uploadConditions.py.

uploadConditions.HTTPError.code

Definition at line 208 of file uploadConditions.py.

uploadConditions.HTTPError.response

Definition at line 209 of file uploadConditions.py.