To better align with other OpenStack projects and to reduce the
ongoing problem with duplicate imports, this patch re-enables the
H306 check for proper module import order.
Change-Id: Iced92590829f6d9177d64ad4868aebe6eafd6a8a
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.
Fix problems found.
Update local hacking checks for new flake8.
# to unbreak gate:
Depends-on: https://review.opendev.org/715835
Change-Id: Icc2f4368cc90689d74510ce36fe77d2346aec625
TrivialFix: Similar [1] in Kolla project
As we known, Exceptions are raised by the sys.exit() function. When they
are not handled, no stack traceback is printed in the Python interpreter.
Therefore, when using sys.exit(main()) instead of main()
may be more readable and reasonable.
[1] https://review.openstack.org/#/c/349353/
Change-Id: Ied52a7631da82a72f0dcf2fc9ed81840d24041d9