Skip to content

Commit 5b5a790

Browse files
committed
lint
1 parent f312b3d commit 5b5a790

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111
([#1897](https://github.com/open-telemetry/opentelemetry-python/pull/1897))
1212
- Ignore calls to `Span.set_status` with `StatusCode.UNSET` and also if previous status already
1313
had `StatusCode.OK`.
14-
([#1897](https://github.com/open-telemetry/opentelemetry-python/pull/1897))
14+
([#1902](https://github.com/open-telemetry/opentelemetry-python/pull/1902))
1515

1616
## [1.3.0-0.22b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.3.0-0.22b0) - 2021-06-01
1717

opentelemetry-sdk/src/opentelemetry/sdk/trace/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -808,8 +808,11 @@ def is_recording(self) -> bool:
808808
def set_status(self, status: trace_api.Status) -> None:
809809
# Ignore future calls if status is already set to OK
810810
# Ignore calls to set to StatusCode.UNSET
811-
if self._status and self._status.status_code is StatusCode.OK \
812-
or status.status_code is StatusCode.UNSET:
811+
if (
812+
self._status
813+
and self._status.status_code is StatusCode.OK
814+
or status.status_code is StatusCode.UNSET
815+
):
813816
return
814817
self._status = status
815818

0 commit comments

Comments
 (0)