11import logging
22import requests
33
4+
45class NoAdminException (Exception ):
56 pass
67
@@ -12,7 +13,7 @@ def wrapper(obj, *args, **kwargs):
1213 try :
1314 obj ._http_options ['auth' ] = obj ._http_options ['admin' ]
1415 except KeyError :
15- raise NoAdminException ("No admin credentials were specified" )
16+ raise NoAdminException ("No admin credentials were specified" )
1617
1718 # Call the original function
1819 output = func (* args , ** kwargs )
@@ -28,7 +29,7 @@ class HttpMixin(object):
2829
2930 HEADERS = {
3031 'json' : {"content-type" : "application/json" },
31- # 'xml': {"content-type": "application/xml"}
32+ # 'xml': {"content-type": "application/xml"}
3233 }
3334
3435 def __init__ (self , auth = None , verify = True ):
@@ -41,7 +42,7 @@ def __init__(self, auth=None, verify=True):
4142 def _request (self , verb , url , quiet = False , none_on_404 = False , * args , ** kwargs ):
4243 """Generic request method"""
4344 if not quiet :
44- self ._http_log () .info ("{0}: {1}" .format (verb , url ))
45+ self ._http_log .info ("{0}: {1}" .format (verb , url ))
4546
4647 headers = kwargs .get ('headers' , HttpMixin .HEADERS ['json' ])
4748 result = requests .request (verb , url ,
0 commit comments