Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rely on sdk default for most requests #1056

Merged
merged 1 commit into from
Apr 14, 2020
Merged
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
5 changes: 0 additions & 5 deletions securedrop_client/api_jobs/sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ def call_api(self, api_client: API, session: Session) -> str:
'''
try:
source_sdk_object = sdclientapi.Source(uuid=self.source_uuid)

# TODO: After https://github.com/freedomofpress/securedrop-client/issues/648 is
# merged, we will want to pass the timeout to delete_source instead of setting
# it on the api object
api_client.default_request_timeout = 5
api_client.delete_source(source_sdk_object)

return self.source_uuid
Expand Down
4 changes: 0 additions & 4 deletions securedrop_client/api_jobs/updatestar.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ def call_api(self, api_client: API, session: Session) -> str:
try:
source_sdk_object = sdclientapi.Source(uuid=self.source_uuid)

# TODO: Once https://github.com/freedomofpress/securedrop-client/issues/648, we will
# want to pass the default request timeout to remove_star and add_star instead of
# setting it on the api object directly.
api_client.default_request_timeout = 5
if self.is_starred:
api_client.remove_star(source_sdk_object)
else:
Expand Down
5 changes: 0 additions & 5 deletions securedrop_client/api_jobs/uploads.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,6 @@ def _set_status_to_failed(self, session: Session) -> None:

def _make_call(self, encrypted_reply: str, api_client: API) -> sdclientapi.Reply:
sdk_source = sdclientapi.Source(uuid=self.source_uuid)

# TODO: Once https://github.com/freedomofpress/securedrop-client/issues/648, we will want to
# pass the default request timeout to reply_source instead of setting it on the api object
# directly.
api_client.default_request_timeout = 5
return api_client.reply_source(sdk_source, encrypted_reply, self.reply_uuid)


Expand Down