From c3029878c5efa28eff793405095fe64327c15ad5 Mon Sep 17 00:00:00 2001 From: James Hilliard Date: Thu, 25 Nov 2021 14:37:07 -0700 Subject: [PATCH] utils/scanpypi: fix buildutils check in python3 The message attribute does not exist in python3, see PEP-0352: https://www.python.org/dev/peps/pep-0352/ Fixes: Traceback (most recent call last): File "utils/scanpypi", line 743, in main() File "utils/scanpypi", line 693, in main if 'buildutils' in err.message: AttributeError: 'ImportError' object has no attribute 'message' Signed-off-by: James Hilliard Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- utils/scanpypi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/scanpypi b/utils/scanpypi index 1f3326cf4d..17d8a0017a 100755 --- a/utils/scanpypi +++ b/utils/scanpypi @@ -690,7 +690,7 @@ def main(): try: package.load_setup() except ImportError as err: - if 'buildutils' in err.message: + if 'buildutils' in str(err): print('This package needs buildutils') else: raise