Skip to content

Commit

Permalink
Minor cleanup and version bump
Browse files Browse the repository at this point in the history
corrected version bump
  • Loading branch information
juyeh committed Apr 25, 2018
1 parent b455475 commit 4e5e649
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ docs/_build/
.idea
godaddypy.iml
.cache/
venv*/
File renamed without changes.
2 changes: 1 addition & 1 deletion godaddypy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from .client import Client
from .account import Account

__version__ = '2.2.5'
__version__ = '2.2.6'
__all__ = ['Client', 'Account', '__version__']
12 changes: 5 additions & 7 deletions godaddypy/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
# python2.x
from urlparse import urljoin

__all__ = ['Client', 'BadResponse']

__all__ = ['Client']
GODADDY_API_BASE_URL = 'https://api.godaddy.com/'
GODADDY_API_VERSION = 'v1'

GODADDY_API_BASE_URL='https://api.godaddy.com/'
GODADDY_API_VERSION='v1'

class Client(object):
"""The GoDaddyPy Client.
Expand Down Expand Up @@ -104,7 +104,7 @@ def _validate_response_success(response):
always return 200 for a correct request """
try:
response.raise_for_status()
except Exception as e:
except Exception:
raise BadResponse(response.json())

def add_record(self, domain, record):
Expand Down Expand Up @@ -306,9 +306,7 @@ def update_record(self, domain, record, record_type=None, name=None):
name = record['name']

url = self.API_TEMPLATE + self.RECORDS_TYPE_NAME.format(domain=domain, type=record_type, name=name)
records = []
records.append(record)
self._put(url, json=records)
self._put(url, json=[record])
self.logger.info(
'Updated record. Domain {} name {} type {}'.format(domain, str(record['name']), str(record['type'])))

Expand Down
2 changes: 1 addition & 1 deletion tests/test_Client.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from godaddypy.client import BadResponse


class TestClient:
class TestClient(object):
@classmethod
def setup_class(cls):
cls.logger = logging.getLogger(cls.__name__)
Expand Down

0 comments on commit 4e5e649

Please sign in to comment.