Skip to content

Commit bfbcf1c

Browse files
committed
Linting and formatting.
1 parent 3170cfd commit bfbcf1c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

adafruit_httpserver.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ def __init__(
6767
self.method = method
6868
else:
6969
# Parse request data from raw request
70-
request_text = raw_request.decode('utf8')
71-
first_line = request_text[:request_text.find('\n')]
70+
request_text = raw_request.decode("utf8")
71+
first_line = request_text[: request_text.find("\n")]
7272
try:
7373
(self.method, self.path, _httpversion) = first_line.split()
74-
except ValueError:
75-
raise ValueError("Unparseable raw_request: ", raw_request)
74+
except ValueError as exc:
75+
raise ValueError("Unparseable raw_request: ", raw_request) from exc
7676

7777
def __hash__(self) -> int:
7878
return hash(self.method) ^ hash(self.path)

0 commit comments

Comments
 (0)