Skip to content

Commit

Permalink
catch AttributeError on import
Browse files Browse the repository at this point in the history
Signed-off-by: Sylvain Hellegouarch <sh@defuze.org>
  • Loading branch information
Lawouach committed Aug 3, 2023
1 parent b511276 commit a54f3f2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,16 @@

## [Unreleased][]

[Unreleased]: https://github.com/chaostoolkit-incubator/chaostoolkit-opentracing/compare/0.13.1...HEAD
[Unreleased]: https://github.com/chaostoolkit-incubator/chaostoolkit-opentracing/compare/0.13.2..HEAD

## [0.13.2][] - 2023-08-03

[0.13.2]: https://github.com/chaostoolkit-incubator/chaostoolkit-opentracing/compare/0.13.1...0.13.2

### Fixed

- Trap `AttributeError` when loading httpx. This can happen from a locust
file as they are relying on gevent heavily which changes the socket module

## [0.13.1][] - 2023-08-02

Expand Down
2 changes: 1 addition & 1 deletion chaostracing/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# -*- coding: utf-8 -*-
__version__ = "0.13.1"
__version__ = "0.13.2"
2 changes: 1 addition & 1 deletion chaostracing/oltp.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from opentelemetry.instrumentation.httpx import HTTPXClientInstrumentor

HAS_HTTPX = True
except ImportError:
except (AttributeError, ImportError):
logger.debug("Failed to import HTTPXClientInstrumentor", exc_info=True)
HAS_HTTPX = False
try:
Expand Down

0 comments on commit a54f3f2

Please sign in to comment.