Skip to content

Commit e7a2deb

Browse files
committed
Minor changes in comments
1 parent 77bc821 commit e7a2deb

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

adafruit_httpserver/server.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ def poll(self):
155155
conn, received_body_bytes, content_length
156156
)
157157

158+
# Find a handler for the route
158159
handler = self.routes.find_handler(
159160
_HTTPRoute(request.path, request.method)
160161
)
@@ -176,13 +177,13 @@ def poll(self):
176177
request, status=CommonHTTPStatus.BAD_REQUEST_400
177178
).send()
178179

179-
except OSError as ex:
180-
# handle EAGAIN and ECONNRESET
181-
if ex.errno == EAGAIN:
182-
# there is no data available right now, try again later.
180+
except OSError as error:
181+
# Handle EAGAIN and ECONNRESET
182+
if error.errno == EAGAIN:
183+
# There is no data available right now, try again later.
183184
return
184-
if ex.errno == ECONNRESET:
185-
# connection reset by peer, try again later.
185+
if error.errno == ECONNRESET:
186+
# Connection reset by peer, try again later.
186187
return
187188
raise
188189

0 commit comments

Comments
 (0)