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 <module> 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 <james.hilliard1@gmail.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
This commit is contained in:
parent
13add49b2a
commit
c3029878c5
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user