Skip to content

Commit 66fb954

Browse files
committed
Fix python2.7 compatibility with wrapt library
1 parent 89aac8f commit 66fb954

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

iopipe/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
PROCESS_ID = str(uuid.uuid4())
77
TIMESTAMP_FORMAT = "%Y-%m-%dT%H:%M:%S.%fZ"
88
METRIC_NAME_LIMIT = 128
9-
VERSION = "1.9.1"
9+
VERSION = "1.9.2"

iopipe/contrib/trace/auto_db.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def wrapper(wrapped, instance, args, kwargs):
108108

109109
try:
110110
wrapt.wrap_function_wrapper("pymongo.collection", "Collection.find", wrapper)
111-
except ModuleNotFoundError: # pragma: no cover
111+
except Exception: # pragma: no cover
112112
pass
113113
else:
114114
for class_method in (
@@ -169,7 +169,7 @@ def pipeline_wrapper(wrapped, instance, args, kwargs): # pragma: no cover
169169

170170
try:
171171
wrapt.wrap_function_wrapper("redis.client", "Redis.execute_command", wrapper)
172-
except ModuleNotFoundError: # pragma: no cover
172+
except Exception: # pragma: no cover
173173
pass
174174
else:
175175
for module_name, class_method in [

iopipe/contrib/trace/auto_http.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def wrapper(wrapped, instance, args, kwargs):
5656

5757
try:
5858
wrapt.wrap_function_wrapper("requests.sessions", "Session.send", wrapper)
59-
except ModuleNotFoundError: # pragma: no cover
59+
except Exception: # pragma: no cover
6060
pass
6161

6262

@@ -83,7 +83,7 @@ def wrapper(wrapped, instance, args, kwargs):
8383
wrapt.wrap_function_wrapper(
8484
"botocore.httpsession", "URLLib3Session.send", wrapper
8585
)
86-
except ModuleNotFoundError: # pragma: no cover
86+
except Exception: # pragma: no cover
8787
pass
8888

8989

@@ -110,7 +110,7 @@ def wrapper(wrapped, instance, args, kwargs):
110110
wrapt.wrap_function_wrapper(
111111
"botocore.vendored.requests.sessions", "Session.send", wrapper
112112
)
113-
except ModuleNotFoundError: # pragma: no cover
113+
except Exception: # pragma: no cover
114114
pass
115115

116116

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
setup(
3636
name="iopipe",
37-
version="1.9.1",
37+
version="1.9.2",
3838
description="IOpipe agent for serverless Application Performance Monitoring",
3939
long_description=README,
4040
author="IOpipe",

0 commit comments

Comments
 (0)