Skip to content

Commit 2f91234

Browse files
committed
.
1 parent 07a3ea3 commit 2f91234

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

sentry_sdk/integrations/stdlib.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,12 +350,15 @@ def sentry_patched_popen_init(
350350
span.set_tag("subprocess.pid", self.pid)
351351

352352
with capture_internal_exceptions():
353-
breadcrumb_data = {"subprocess.cwd": cwd} if cwd else {}
353+
data = {}
354+
if cwd:
355+
data["subprocess.cwd"] = cwd
356+
354357
sentry_sdk.add_breadcrumb(
355358
type="subprocess",
356359
category="subprocess",
357360
message=description,
358-
data=breadcrumb_data,
361+
data=data,
359362
)
360363

361364
return rv

0 commit comments

Comments
 (0)