| Message ID | 20241008123627.252307-5-richard.purdie@linuxfoundation.org |
|---|---|
| State | Accepted, archived |
| Commit | c11c9f18dad1cf4cb21e3bd873338ecc95652062 |
| Headers | show |
| Series | [1/8] COW: Fix hardcoded magic numbers and work with python 3.13 | expand |
diff --git a/lib/bb/exceptions.py b/lib/bb/exceptions.py index 801db9c82f..acf546de1d 100644 --- a/lib/bb/exceptions.py +++ b/lib/bb/exceptions.py @@ -38,14 +38,8 @@ def _get_frame_args(frame): """Get the formatted arguments and class (if available) for a frame""" arginfo = inspect.getargvalues(frame) - try: - if not arginfo.args: + if not arginfo.args: return '', None - # There have been reports from the field of python 2.6 which doesn't - # return a namedtuple here but simply a tuple so fallback gracefully if - # args isn't present. - except AttributeError: - return '', None firstarg = arginfo.args[0] if firstarg == 'self':
In python 3 we should always have named tuples in this context. Drop the obsolete exception handling. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> --- lib/bb/exceptions.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)