Fix Python 3 syntax in SONiC container startup scripts
The common startup script used for SONiC containers is calling an inline python command that uses Python 2 syntax, and thus errors out when run with Python 3. Make this work with Python 3. Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
This commit is contained in:
parent
91f6800500
commit
33e4b7f90e
@ -57,7 +57,7 @@ function ebtables_config()
|
||||
|
||||
function getMountPoint()
|
||||
{
|
||||
echo $1 | python -c "import sys, json, os; mnts = [x for x in json.load(sys.stdin)[0]['Mounts'] if x['Destination'] == '/usr/share/sonic/hwsku']; print '' if len(mnts) == 0 else os.path.abspath(mnts[0]['Source'])" 2>/dev/null
|
||||
echo $1 | python -c "import sys, json, os; mnts = [x for x in json.load(sys.stdin)[0]['Mounts'] if x['Destination'] == '/usr/share/sonic/hwsku']; print('' if len(mnts) == 0 else os.path.abspath(mnts[0]['Source']))" 2>/dev/null
|
||||
}
|
||||
|
||||
function getBootType()
|
||||
|
Reference in New Issue
Block a user