Skip to content

Commit 2c62dbe

Browse files
committed
Fixed minor bugs preventing usage
1 parent 36d5f79 commit 2c62dbe

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

stackdio/client/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@ def __init__(self, base_url, auth, auth_admin=None, verify=False):
2020
"""auth_admin is optional, only needed for creating provider, profile,
2121
and base security groups"""
2222

23-
super(StandardError, self).__init__(auth=auth, verify=verify)
23+
super(StackdIO, self).__init__(auth=auth, verify=verify)
2424
self.base_url = base_url
2525
self.auth = auth
2626
self.auth_admin = auth_admin
2727

28+
2829
@use_admin_auth
2930
def create_provider(self, **kwargs):
3031
"""Create a provider"""

stackdio/client/http.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import logging
22
import requests
33

4+
45
class 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,

stackdio/client/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.0.1"
1+
__version__ = "0.0.2"

0 commit comments

Comments
 (0)