CMS 3D CMS Logo

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__ (self, code, response)
 

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  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 
61 
def __init__(self, code, response)
double split
Definition: MVATrainer.cc:139

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.