Skip to content

Commit

Permalink
Oops, walrus not supported
Browse files Browse the repository at this point in the history
  • Loading branch information
yecril23pl authored Feb 24, 2024
1 parent ffa501a commit e9faa5f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions multipart/multipart.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from __future__ import annotations
Update multipart.pyfrom __future__ import annotations

import io
import logging
Expand Down Expand Up @@ -1219,7 +1219,9 @@ def data_callback(name: str, remaining: bool = False) -> None:

else:
# Check to ensure our boundary matches
if c != (e := boundary[i2 := index + 2]):
i2 = index + 2
e = boundary[i2]
if c != e:
msg = "Expected boundary character %r, got %r at index %d" % (e, c, i2)
self.logger.warning(msg)
e = MultipartParseError(msg)
Expand Down

0 comments on commit e9faa5f

Please sign in to comment.