8000 fix: TypeError: unsupported operand type(s) for +=: 'NoneType' and 's… · pythonthings/sentry-python@866481c · GitHub
[go: up one dir, main page]

Skip to content

Commit 866481c

Browse files
mednsuntitaker
authored andcommitted
fix: TypeError: unsupported operand type(s) for +=: 'NoneType' and 'str' when Python with -O flag (getsentry#341)
1 parent 2f54872 commit 866481c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

sentry_sdk/integrations/__init__.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,11 @@ def iter_default_integrations():
3131
module, cls = import_string.rsplit(".", 1)
3232
yield getattr(import_module(module), cls)
3333

34-
for import_string in import_strings:
35-
iter_default_integrations.__doc__ += "\n- `{}`".format( # type: ignore
36-
import_string
37-
)
34+
if isinstance(iter_default_integrations.__doc__, str):
35+
for import_string in import_strings:
36+
iter_default_integrations.__doc__ += "\n- `{}`".format( # type: ignore
37+
import_string
38+
)
3839

3940
return iter_default_integrations
4041

0 commit comments

Comments
 (0)
0