From 9a6c5fe1f8677aaa752534aca175bb09675ee36d Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 8 Oct 2024 13:36:24 +0100 Subject: bitbake: bb/exceptions: Drop obsolete 2.6 code In python 3 we should always have named tuples in this context. Drop the obsolete exception handling. (Bitbake rev: c11c9f18dad1cf4cb21e3bd873338ecc95652062) Signed-off-by: Richard Purdie --- bitbake/lib/bb/exceptions.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/bitbake/lib/bb/exceptions.py b/bitbake/lib/bb/exceptions.py index 801db9c82f..acf546de1d 100644 --- a/bitbake/lib/bb/exceptions.py +++ b/bitbake/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': -- cgit v1.2.3-54-g00ecf