Skip to content

Commit a7813a4

Browse files
author
Osmar Coronel
committed
Added py3.7 functionality
1 parent a700116 commit a7813a4

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

sentry_sdk/integrations/beam.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def _inner(*args, **kwargs):
108108

109109
def _capture_exception(exc_info, hub):
110110
"""
111-
Send Beam exception to Sentry
111+
Send Beam exception to Sentry.
112112
"""
113113
integration = hub.get_integration(BeamIntegration)
114114
if integration:
@@ -142,6 +142,6 @@ def _wrap_generator_call(gen, client):
142142
try:
143143
yield next(gen)
144144
except StopIteration:
145-
raise
145+
break
146146
except Exception:
147147
raiseException(client)

tests/integrations/beam/test_beam.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,11 @@ def test_monkey_patch_signature(f, args, kwargs):
153153
class _OutputProcessor(OutputProcessor):
154154
def process_outputs(self, windowed_input_element, results):
155155
print(windowed_input_element)
156-
for result in results:
157-
assert result
156+
try:
157+
for result in results:
158+
assert result
159+
except StopIteration:
160+
print("In here")
158161

159162

160163
@pytest.fixture

tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ envlist =
3333
{pypy,py2.7}-celery-3
3434

3535
py2.7-beam-{12,13,master}
36-
{py3.6,py3.7,py3.8}-beam-{12,13,master,dev}
36+
{py3.6,py3.7}-beam-{12,13,master}
3737

3838
# The aws_lambda tests deploy to the real AWS and have their own matrix of Python versions.
3939
py3.7-aws_lambda

0 commit comments

Comments
 (0)