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

◆ __init__()

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, dataset, job_number, job_id, job_name, isDA, isMC, applyBOWS, applyEXTRACOND, extraconditions, runboundary, lumilist, intlumi, maxevents, gt, allFromGT, alignmentDB, alignmentTAG, apeDB, apeTAG, bowDB, bowTAG, vertextype, tracktype, refittertype, ttrhtype, applyruncontrol, ptcut, CMSSW_dir, the_dir)

Member Data Documentation

◆ args

upload_popcon.HTTPError.args

◆ code

upload_popcon.HTTPError.code

Definition at line 52 of file upload_popcon.py.

◆ response

upload_popcon.HTTPError.response

Definition at line 53 of file upload_popcon.py.