From d8cd69cee63817ec0ca3a974a74710f3e8401bc9 Mon Sep 17 00:00:00 2001 From: Frederik Slos Date: Fri, 6 May 2022 16:00:00 +0200 Subject: [PATCH] fix/string encode compatibility --- src/redfish/rest/connections.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/redfish/rest/connections.py b/src/redfish/rest/connections.py index a48bcb2..e806eb3 100644 --- a/src/redfish/rest/connections.py +++ b/src/redfish/rest/connections.py @@ -164,7 +164,7 @@ def rest_request(self, path, method='GET', args=None, body=None, headers=None): files = None request_args = {} if isinstance(path, bytes): - path = str(path, "utf-8") + path = str(path).encode("utf-8") external_uri = True if 'redfish.dmtf.org' in path else False else: external_uri = True if 'redfish.dmtf.org' in path else False