diff options
Diffstat (limited to 'dgbuilder/tools')
-rw-r--r-- | dgbuilder/tools/formatXml.py | 2 | ||||
-rwxr-xr-x | dgbuilder/tools/format_json.sh | 3 | ||||
-rwxr-xr-x | dgbuilder/tools/format_xml.sh | 5 | ||||
-rwxr-xr-x | dgbuilder/tools/getRpcsClassFromYang.sh | 2 |
4 files changed, 7 insertions, 5 deletions
diff --git a/dgbuilder/tools/formatXml.py b/dgbuilder/tools/formatXml.py index 913456a1..7d7d7b6c 100644 --- a/dgbuilder/tools/formatXml.py +++ b/dgbuilder/tools/formatXml.py @@ -8,4 +8,4 @@ xml_fname=sys.argv[1] #print pretty_xml_as_string x = etree.parse(xml_fname) -print etree.tostring(x, pretty_print = True) +print(etree.tostring(x, pretty_print = True)) diff --git a/dgbuilder/tools/format_json.sh b/dgbuilder/tools/format_json.sh index f86ad3cf..5432e7d3 100755 --- a/dgbuilder/tools/format_json.sh +++ b/dgbuilder/tools/format_json.sh @@ -1,6 +1,7 @@ +#!/bin/bash if [ "$#" != "1" ] then echo "Usage: $0 jsonFileFullPath" exit fi -cat $1|python -m json.tool +python3 -m json.tool "$1" diff --git a/dgbuilder/tools/format_xml.sh b/dgbuilder/tools/format_xml.sh index c66153ed..fbe368e1 100755 --- a/dgbuilder/tools/format_xml.sh +++ b/dgbuilder/tools/format_xml.sh @@ -1,3 +1,4 @@ +#!/bin/bash if [ "$#" != "1" ] then echo "Usage: $0 xmlFileFullPath" @@ -10,7 +11,7 @@ then fi if [ -e "$1" ] then - python $PROJECT_HOME/tools/formatXml.py $1 + python3 $PROJECT_HOME/tools/formatXml.py "$1" else - echo "File $1 does not exist" + echo "File $1 does not exist" fi diff --git a/dgbuilder/tools/getRpcsClassFromYang.sh b/dgbuilder/tools/getRpcsClassFromYang.sh index 3944ed25..d32456b0 100755 --- a/dgbuilder/tools/getRpcsClassFromYang.sh +++ b/dgbuilder/tools/getRpcsClassFromYang.sh @@ -59,7 +59,7 @@ done echo "module.exports = {" echo "\"moduleName\" : \"${module}\"," echo "'${module}_VALUES' : " -echo "[ $allProps ]"|python -m json.tool +echo "[ $allProps ]"|python3 -m json.tool echo "," echo "'${module}_RPCS' : [" |