original_docstring: Raises exception if HTTP status code is not successful (2XX status code).
docstring: Raises exception if HTTP status code is not successful (2XX status code).
docstring_tokens: Raises exception if HTTP status code is not successful ( 2XX status code ) .
code: def check_response(resp):
      """Raises exception if HTTP status code is not successful (2XX status code)."""
  
      if 200 <= resp.status_code < 300:
          log.debug('Response: %r', resp)
      else:
          log.error('Response text: %s', resp.text)
          raise RuntimeError('Put request failed: %r' % resp)
code_tokens: def check_response ( resp ) : if 200 <= resp . status_code < 300 : log . debug ( 'Response: %r' , resp ) else : log . error ( 'Response text: %s' , resp . text ) raise RuntimeError ( 'Put request failed: %r' % resp )
short_docstring: Raises exception if HTTP status code is not successful (2XX status code).
short_docstring_tokens: Raises exception if HTTP status code is not successful ( 2XX status code ) .
comment: """Raises exception if HTTP status code is not successful (2XX status code)."""