Fix debug with requests.

- From http://docs.python.org/2/library/functions.html#hasattr :
   hasattr(object, name) -- The arguments are an object and a string.
- Fixes bug 1124084.

Change-Id: I47283abff440abdf827598c2497519f3de510baf