This repository has been archived by the owner on May 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 303
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
See: gabrielfalcao/sure#169 git-svn-id: file:///srv/repos/svn-community/svn@1065520 9fca08f4-af9d-4005-b8df-a31f2cc04f65
- Loading branch information
yan12125
committed
Dec 7, 2021
1 parent
12792e3
commit fc7c86c
Showing
2 changed files
with
22 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/sure/__init__.py b/sure/__init__.py | ||
index ef50bd4..d4c2afb 100644 | ||
--- a/sure/__init__.py | ||
+++ b/sure/__init__.py | ||
@@ -126,7 +126,7 @@ class CallBack(object): | ||
err = traceback.format_exc().splitlines()[-1] | ||
err = err.replace("{0}:".format(exc_klass.__name__), "").strip() | ||
|
||
- if err.startswith(self.callback_name) and ( | ||
+ if self.callback_name in err and ( | ||
"takes no arguments (1 given)" in err | ||
or "takes 0 positional arguments but 1 was given" in err | ||
): |