[SDFAB-1197] First stab to update ONOS to py3
Update has been performed only on the scripts and the
executables strictly necessary for the following use cases:
- Build (including Intellij)
- Tests (including Intellij)
- Docker build (including dev and yourkit)
- Upload snapshot (including local)
- Release
Finally, fix the ability to run ONOS using onos-local targets,
stc and docker stc (aka up4 stc env). Last but not least, updated
the azul image to a newer one which exports also the PYTHONENCODING
Change-Id: Ie96f3a9c76dbba83b1fc3896a372f1045d3d7ccc
diff --git a/tools/package/onos_stage.py b/tools/package/onos_stage.py
index 7a48650..ac66906 100755
--- a/tools/package/onos_stage.py
+++ b/tools/package/onos_stage.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Copyright 2017-present Open Networking Foundation
diff --git a/tools/package/runtime/bin/_check-json b/tools/package/runtime/bin/_check-json
index 1eef25b..0ebaf2c 100644
--- a/tools/package/runtime/bin/_check-json
+++ b/tools/package/runtime/bin/_check-json
@@ -22,7 +22,7 @@
# -----------------------------------------------------------------------------
checkJson() {
- cat ${1} | python -m json.tool >> /dev/null
+ cat ${1} | python3 -m json.tool >> /dev/null
if [ "$?" -ne "0" ]; then
echo "Not valid JSON File" && exit 1
fi