Skip to content

Commit

Permalink
Ignore an incorrect pylint error (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
t-persson authored Apr 18, 2024
1 parent b580e4f commit 5c05f5e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/etos_lib/eiffel/publisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ def send_event(self, event: EiffelBaseEvent, block: bool = True) -> None:
add_span_eiffel_attributes(span, event)

_LOG.debug("[%s] Attempting to acquire 'send_event' lock", current_thread().name)
# Pylint is wrong.. pylint:disable=not-context-manager
with self._lock, trace.use_span(span, end_on_exit=True) as _span:
_LOG.debug("[%s] 'send_event' Lock acquired", current_thread().name)
propagate.inject(properties.headers)
Expand Down
2 changes: 2 additions & 0 deletions src/etos_lib/eiffel/subscriber.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,13 @@ def _tracer_call(
try:
event = self._event(body)
except: # pylint:disable=bare-except
# Pylint is wrong.. pylint:disable=not-context-manager
with trace.use_span(span, end_on_exit=True) as span:
raise
if span.is_recording():
add_span_eiffel_attributes(span, event)
try:
# Pylint is wrong.. pylint:disable=not-context-manager
with trace.use_span(span, end_on_exit=True):
response = self._event_call(event)
finally:
Expand Down

0 comments on commit 5c05f5e

Please sign in to comment.