diff options
author | Christian Tismer <tismer@stackless.com> | 2020-11-24 18:33:13 +0100 |
---|---|---|
committer | Christian Tismer <tismer@stackless.com> | 2020-11-25 07:45:24 +0000 |
commit | 0e03a2524e1d98f717f204252e155762e0439e93 (patch) | |
tree | c0755b232b37419ac2528b1d1f9a23e5c0f6d5b6 /sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/errorhandler.py | |
parent | d5bc255aa50a9181a3258b17c07b8da0890cb035 (diff) |
errorhandler.py: use AttributeError instead of TypeError
There is a small improvement needed in errorhandler.py:
It was not consequent to use TypeError for missing attributes
in one case, and to use AttributeError on the constructors.
The error message may be different, but it always should be
AttributeError.
Task-number: PYSIDE-1305
Task-number: PYSIDE-1019
Change-Id: I1c278c5256000f0f0fe66ca9da36c2d078002b25
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/errorhandler.py')
-rw-r--r-- | sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/errorhandler.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/errorhandler.py b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/errorhandler.py index 76d2f2e9b..7af7b48b2 100644 --- a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/errorhandler.py +++ b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/errorhandler.py @@ -114,7 +114,7 @@ def seterror_argument(args, func_name, info): return err, msg if info and type(info) is dict: msg = f"{func_name}(): unsupported keyword '{tuple(info)[0]}'" - return TypeError, msg + return AttributeError, msg sigs = get_signature(func, "typeerror") if not sigs: msg = f"{func_name}({args}) is wrong (missing signature)" |