[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:
Volodymyr Boiko 2021-03-12 21:52:47 +02:00 committed by GitHub
parent b60d1fc526
commit 1785efa6b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)