Skip to content

Commit

Permalink
Update fasthttp.py
Browse files Browse the repository at this point in the history
fix: fasthttp.py to comply with PEP 8
  • Loading branch information
MasterKey-Pro authored Jan 8, 2025
1 parent e2acf1d commit f2c1ced
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion locust/contrib/fasthttp.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def get(self, url: str, **kwargs: Unpack[RESTKwargs]) -> ResponseContextManager
def iter_lines(self, url: str, **kwargs) -> Generator[str, None, None]:
"""Sends a iter_lines request"""
response = self.request("GET", url, stream=True, **kwargs)
response.raise_for_status() # Check for HTTP errors
response.raise_for_status()
buffer = ''
for chunk in response.iter_content(chunk_size=1024):
buffer += chunk.decode('utf-8')
Expand Down

0 comments on commit f2c1ced

Please sign in to comment.