title: Using the Python "requests" library, how can I tell if a ConnectionError is client side or Server side?
body: <p>Here is my ugly little code snippet now:</p>
  
  <pre><code>for i in range(5):
          try:
              self.startTime=time.time()
              self.rawfeed=requests.get(self.feedurl)
              continue
          except ConnectionError:
              print "Got a connection error.  Retrying", i
              time.sleep(i*i) # giving a bit longer wait each time
              pass
  if i == 5: raise
  self.ResponseTime=time.time()-self.startTime
  </code></pre>
  
  <p>Two problems here.  First my except statement does not seem to recognize "ConnectionError" as an exception (SOLVED, thanks, stackers), but rather complains that it isn't a global variable.  And second, and more important, I would really like to know if the error is MY side, or the SERVER's side.</p>
  
  <p>Typically I want to retry on MY errors, but give up and report on a SERVER error.  (By "MY" error, I mean anything other than a server error.)</p>