def RaiseHttpError(url, response_info, response_body, extra_msg=''):
 if (response_body is not None):
  stream = cStringIO.StringIO()
  stream.write(response_body)
  stream.seek(0)
 else:
  stream = None
 if (not extra_msg):
  msg = response_info.reason
 else:
  msg = ((response_info.reason + ' ') + extra_msg)
 raise urllib2.HTTPError(url, response_info.status, msg, response_info, stream)

def RaiseHttpError ( url , response_info , response_body , extra_msg = '' ) : if ( response_body is not None ) : stream = cStringIO . StringIO ( ) stream . write ( response_body ) stream . seek ( 0 ) else : stream = None if ( not extra_msg ) : msg = response_info . reason else : msg = ( ( response_info . reason + ' ' ) + extra_msg ) raise urllib2 . HTTPError ( url , response_info . status , msg , response_info , stream )
raise a urllib2 .