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
This commit is contained in:
Chmouel Boudjnah
2013-02-09 03:22:00 +01:00
parent acdba5ee52
commit 1ba04810e9

View File

@@ -117,7 +117,7 @@ class HTTPClient(object):
ch = logging.StreamHandler()
_logger.setLevel(logging.DEBUG)
_logger.addHandler(ch)
if hasattr(requests, logging):
if hasattr(requests, 'logging'):
requests.logging.getLogger(requests.__name__).addHandler(ch)
# keyring setup