From 1332d3cac6239c08a8d42127bdb7348a79f23f60 Mon Sep 17 00:00:00 2001 From: Allie Crevier Date: Thu, 9 Apr 2020 11:59:46 -0700 Subject: [PATCH] rely on sdk default for most requests --- securedrop_client/api_jobs/sources.py | 5 ----- securedrop_client/api_jobs/updatestar.py | 4 ---- securedrop_client/api_jobs/uploads.py | 5 ----- 3 files changed, 14 deletions(-) diff --git a/securedrop_client/api_jobs/sources.py b/securedrop_client/api_jobs/sources.py index dd2de4121..9355d9a94 100644 --- a/securedrop_client/api_jobs/sources.py +++ b/securedrop_client/api_jobs/sources.py @@ -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 diff --git a/securedrop_client/api_jobs/updatestar.py b/securedrop_client/api_jobs/updatestar.py index ce9f2fac3..51430917d 100644 --- a/securedrop_client/api_jobs/updatestar.py +++ b/securedrop_client/api_jobs/updatestar.py @@ -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: diff --git a/securedrop_client/api_jobs/uploads.py b/securedrop_client/api_jobs/uploads.py index 2b9059617..d01b10202 100644 --- a/securedrop_client/api_jobs/uploads.py +++ b/securedrop_client/api_jobs/uploads.py @@ -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)