diff --git a/pyzipline/rest_adapter.py b/pyzipline/rest_adapter.py index 143a3a6..04876ec 100644 --- a/pyzipline/rest_adapter.py +++ b/pyzipline/rest_adapter.py @@ -68,8 +68,7 @@ class RestAdapter: if response.headers.get('Content-Type') == 'application/octet-stream': # If the response contains a valid file, return success Result with file content return Result(success=True, status_code=response.status_code, message=response.reason, data=response.content) - else: - raise PyZiplineError("Could not decode response from Zipline server") from e + raise PyZiplineError("Could not decode response from Zipline server") from e # If status_code in 200-299 range, return success Result with data, otherwise return failed Result with message is_success = 299 >= response.status_code >= 200 diff --git a/pyzipline/zipline.py b/pyzipline/zipline.py index 58099a9..1834dc8 100644 --- a/pyzipline/zipline.py +++ b/pyzipline/zipline.py @@ -272,7 +272,7 @@ class ZiplineApi: Returns: bytes: The file, in bytes """ - result: Result = self._rest_adapter.get(endpoint=f"auth/image", params={'id': file_id, 'password': password}) + result: Result = self._rest_adapter.get(endpoint="auth/image", params={'id': file_id, 'password': password}) if result.status_code == 200: return result.data if result.message == 'image not found':