Skip to content

Commit

Permalink
Removing json import and using requests library kwargs instead.
Browse files Browse the repository at this point in the history
Linter changes.
  • Loading branch information
naemono committed Nov 5, 2015
1 parent b81e7b5 commit 798dcf9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 2 additions & 3 deletions objectrocket/bases.py
@@ -1,6 +1,5 @@
"""Base classes used throughout the library."""
import abc
import json
import requests
import six

Expand Down Expand Up @@ -150,7 +149,7 @@ def acl_sync(self, aws_sync=None, rackspace_sync=None):
if rackspace_sync is not None:
data.update({"rackspace_acl_sync_enabled": rackspace_sync})

response = requests.put(url, data=json.dumps(data), **self._instances._default_request_kwargs)
response = requests.put(url, json=data, **self._instances._default_request_kwargs)
return response.json()
else:
raise errors.ObjectRocketException("Couldn't get current status of instance, failing. Error: {}".format(response.text))
Expand All @@ -170,7 +169,7 @@ def run_acl_sync(self, aws_sync=False, rackspace_sync=False):
if rackspace_sync:
data.update({"rackspace_acl_sync_enabled": True})

response = requests.post(url, data=json.dumps(data), **self._instances._default_request_kwargs)
response = requests.post(url, json=data, **self._instances._default_request_kwargs)
return response.json()

@property
Expand Down
1 change: 1 addition & 0 deletions tests/test_auth.py
Expand Up @@ -9,6 +9,7 @@
from objectrocket.auth import Auth
from objectrocket.client import Client


@pytest.fixture
def auth_url(mongodb_sharded_instance):
return "https://sjc-api.objectrocket.com/v2/tokens/"
Expand Down

0 comments on commit 798dcf9

Please sign in to comment.