Skip to content

Commit

Permalink
Hatch fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Archmonger committed Oct 28, 2024
1 parent 08ea405 commit da78d9c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/servestatic/responders.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ def get_range_response(self, range_header, base_headers, file_handle):
else:
headers.append(item)
if size is None:
raise ValueError("Content-Length header is required for range requests")
msg = "Content-Length header is required for range requests"
raise ValueError(msg)
start, end = self.get_byte_range(range_header, size)
if start >= end:
return self.get_range_not_satisfiable_response(file_handle, size)
Expand All @@ -181,7 +182,8 @@ async def aget_range_response(self, range_header, base_headers, file_handle):
else:
headers.append(item)
if size is None:
raise ValueError("Content-Length header is required for range requests")
msg = "Content-Length header is required for range requests"
raise ValueError(msg)
start, end = self.get_byte_range(range_header, size)
if start >= end:
return await self.aget_range_not_satisfiable_response(file_handle, size)
Expand Down
1 change: 0 additions & 1 deletion tests/django_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import os.path


from .utils import TEST_FILE_PATH, AppServer

ALLOWED_HOSTS = ["*"]
Expand Down

0 comments on commit da78d9c

Please sign in to comment.