scripts: Fix issues with latest versions of Python
Running the repo scripts with the latest Python 3.9 release causes some issues that are fixed with the following changes. We now use Python 3 by default as some changes are not compatible with Python 2.
- Decode subprocess output to string
- Replace deprecated print syntax
- Remove deprecated parameter from ConfigParser.get()
- Fix exception syntax
- Fix indentation
- Fix lambda syntax
Attention: This removes compatibility with Python 2
Edited by Frieder Schrempf