Skip to content

Commit 3705000

Browse files
authored
Merge pull request #5 from har777/fix-gracefully-fail-callback-function-loading-error
Gracefully fail callback function if module not found
2 parents a6de4f9 + 1debe6c commit 3705000

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pellet/middleware.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def __call__(self, request):
9494
response=response,
9595
pellet_metrics=pellet_metrics.__dict__,
9696
)
97-
except (AttributeError, IndexError):
97+
except (AttributeError, IndexError, ModuleNotFoundError):
9898
logger.exception(
9999
"Pellet callback: {callback_name} failed".format(
100100
callback_name=callback_path

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "pellet"
3-
version = "0.1.2"
3+
version = "0.1.3"
44
description = "Pellet helps improve your Django app performance by discovering N+1 queries"
55
authors = ["Harikrishnan Shaji <hihari777@gmail.com>"]
66
readme = "README.md"

0 commit comments

Comments
 (0)