title: "NoneType object is not callable" error when getting web page
body: <p>i'm vey new to python and i wrote this code</p>
  
  <pre><code>def geturl(url):
      url = urllib.quote(url,'/:')
      log( __name__ ,"Getting url:[%s]" % url)
      try:
          req = urllib2.Request(url)
          response = urllib2.urlopen(req)
          content    = response.read()
          return_url = response.geturl()
          response.close()
      except Exception, e:
          log( __name__ ,"Failed to get url because %s" % str(e))
          content    = None
          return_url = None
      return(content, return_url)
  
  def myFunc():
      searchurl="http://www.google.com"
      socket.setdefaulttimeout(3)
      content, response_url = geturl(searchurl)
      if content is None:
          log( __name__ , "Content is None!!")
      content = content.replace("string1", "string2")
  </code></pre>
  
  <p>when i run it, i get this error: NoneType object is not callable.
  i can't understand why... i learned that NoneType is the type of None, but i check if "content" variable is None and it's not.
  thx for your help</p>