Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion dropbox/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ class DropboxBase(object):
__metaclass__ = ABCMeta

@abstractmethod
def request(self, route, namespace, arg, arg_binary=None):
def request(self, route, namespace, request_arg, request_binary,
timeout=None):
pass

# ------------------------------------------
Expand Down
3 changes: 2 additions & 1 deletion dropbox/base_team.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ class DropboxTeamBase(object):
__metaclass__ = ABCMeta

@abstractmethod
def request(self, route, namespace, arg, arg_binary=None):
def request(self, route, namespace, request_arg, request_binary,
timeout=None):
pass

# ------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions dropbox/dropbox_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def __init__(self,
if oauth2_refresh_token and not app_key:
raise BadInputException("app_key is required to refresh tokens")

if scope is not None and (len(scope) == 0 or not isinstance(scope, list)):
if scope is not None and (not isinstance(scope, list) or len(scope) == 0):
raise BadInputException("Scope list must be of type list")

self._oauth2_access_token = oauth2_access_token
Expand Down Expand Up @@ -262,7 +262,7 @@ def clone(
oauth2_access_token or self._oauth2_access_token,
max_retries_on_error or self._max_retries_on_error,
max_retries_on_rate_limit or self._max_retries_on_rate_limit,
user_agent or self._user_agent,
user_agent or self._raw_user_agent,
session or self._session,
headers or self._headers,
timeout or self._timeout,
Expand Down Expand Up @@ -379,7 +379,7 @@ def refresh_access_token(self, host=API_HOST, scope=None):
:param scope: list of permission scopes for access token
:return:
"""
if scope is not None and (len(scope) == 0 or not isinstance(scope, list)):
if scope is not None and (not isinstance(scope, list) or len(scope) == 0):
raise BadInputException("Scope list must be of type list")

if not (self._oauth2_refresh_token and self._app_key):
Expand Down
2 changes: 1 addition & 1 deletion dropbox/oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class DropboxOAuth2FlowBase(object):
def __init__(self, consumer_key, consumer_secret=None, locale=None, token_access_type=None,
scope=None, include_granted_scopes=None, use_pkce=False, timeout=DEFAULT_TIMEOUT,
ca_certs=None):
if scope is not None and (len(scope) == 0 or not isinstance(scope, list)):
if scope is not None and (not isinstance(scope, list) or len(scope) == 0):
raise BadInputException("Scope list must be of type list")
if token_access_type is not None and token_access_type not in TOKEN_ACCESS_TYPES:
raise BadInputException("Token access type must be from the following enum: {}".format(
Expand Down
Loading