[platform][barefoot] Use urllib.parse.quote (#7010)
Fix Python 2 -> Python 3 migration issue Signed-off-by: Volodymyr Boyko <volodymyrx.boiko@intel.com>
This commit is contained in:
parent
b60d1fc526
commit
1785efa6b0
@ -1,13 +1,13 @@
|
|||||||
import sys
|
import sys
|
||||||
import codecs
|
import codecs
|
||||||
import urllib
|
from urllib.parse import quote
|
||||||
|
|
||||||
from sonic_platform.platform_thrift_client import thrift_try
|
from sonic_platform.platform_thrift_client import thrift_try
|
||||||
|
|
||||||
def platform_sensors_get(args):
|
def platform_sensors_get(args):
|
||||||
options = ""
|
options = ""
|
||||||
if len(args)!=0:
|
if len(args)!=0:
|
||||||
options = urllib.quote(" ".join(args))
|
options = quote(" ".join(args))
|
||||||
def get_data(client):
|
def get_data(client):
|
||||||
return client.pltfm_mgr.pltfm_mgr_sensor_info_get(options)
|
return client.pltfm_mgr.pltfm_mgr_sensor_info_get(options)
|
||||||
raw_out = thrift_try(get_data)
|
raw_out = thrift_try(get_data)
|
||||||
|
Reference in New Issue
Block a user