Skip to content

Commit

Permalink
Merge branch 'master' into changelog-releasenotes
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle-Verhoog authored Aug 27, 2024
2 parents 65e461b + 3775b95 commit 38267a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ddapm_test_agent/tracerflare.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import base64
from typing import Dict

from aiohttp import BodyPartReader
from aiohttp import MultipartReader
from aiohttp import StreamReader
from aiohttp.web import Request
Expand All @@ -18,7 +19,7 @@ async def v1_decode(request: Request, data: bytes) -> TracerFlareEvent:
stream.feed_data(data)
stream.feed_eof()
async for part in MultipartReader(request.headers, stream):
if part.name is not None:
if isinstance(part, BodyPartReader) and part.name:
if part.name == "flare_file":
tracer_flare[part.name] = base64.b64encode(await part.read()).decode("ascii")
else:
Expand Down

0 comments on commit 38267a2

Please sign in to comment.