Skip to content

Commit

Permalink
rely on sdk default for most requests
Browse files Browse the repository at this point in the history
  • Loading branch information
Allie Crevier committed Apr 9, 2020
1 parent 56e0981 commit 82a5d18
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 14 deletions.
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

0 comments on commit 82a5d18

Please sign in to comment.