title: AttributeError: 'function' object has no attribute 'response'
body: <p>I have an error handling module that I'm using in my main script to make requests to an API. I want to return "response" and "data" to use in the main script. It works up until trying to print "response". Apologies for inconsistencies, I am obviously still learning. And I won't learn without making a few mistakes first. I appreciate constructive criticism. </p>
  
  <p><strong>my_module</strong></p>
  
  <pre><code>import requests
  import json
  
  def errorHandler(url):
      try:
          response = requests.get(url, timeout=5)
          status = response.status_code
          data = response.json()
      except requests.exceptions.Timeout:
          print "Timeout error.\n"
      except requests.exceptions.ConnectionError:
          print "Connection error.\n"
      except ValueError:
          print "ValueError: No JSON object could be decoded.\n"
      else:
          if response.status_code == 200:
              print "Status: 200 OK \n"
          elif response.status_code == 400:
              print "Status: " + str(status) + " error. Bad request."
              print "Correlation ID: " + str(data['correlationId']) + "\n"
          else:
              print "Status: " + str(status) + " error.\n"
  
      return response
      return data
  </code></pre>
  
  <p><strong>my_script</strong></p>
  
  <pre><code>errorHandler("https://api.weather.gov/alerts/active")
  
  print "Content type is " + response.headers['content-type'] +".\n" #expect geo+json
  
  # I need the data from the module to do this, but not for each get request
  nwsId = data['features'][0]['properties']['id']
  </code></pre>
  
  <p><strong>error</strong></p>
  
  <pre><code>Traceback (most recent call last):
    File "my_script.py", line 20, in &lt;module&gt;
      print errorHandler.response
  AttributeError: 'function' object has no attribute 'response'
  </code></pre>