From 8972bf7fd15fb2780db1022c06daa2f88ad63d46 Mon Sep 17 00:00:00 2001 From: Ritesh Chikatwar Date: Mon, 11 May 2020 18:20:48 +0530 Subject: events: fix python3 compatibility As there is no "unicode" in py3 so removing it. Problem: vdsm-client command failing below traceback [root@dhcp35-179 ~]# cat < runcli() File "/usr/lib/python3.6/site-packages/gluster/cliutils/cliutils.py", line 232, in runcli cls.run(args)\n File "/sbin/gluster-eventsapi", line 357, in run isinstance(data[args.url], unicode):NameError: name \'unicode\' is not defined') Solution: In py3 str can hold unicode string. Change-Id: I3dc59df8b812f236380d2d57cfcf8e3aba91e582 Fixes: #1226 Signed-off-by: Ritesh Chikatwar --- events/src/peer_eventsapi.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/events/src/peer_eventsapi.py b/events/src/peer_eventsapi.py index 26b77a09179..4d2e5f35b1c 100644 --- a/events/src/peer_eventsapi.py +++ b/events/src/peer_eventsapi.py @@ -353,8 +353,7 @@ class WebhookModCmd(Cmd): errcode=ERROR_WEBHOOK_NOT_EXISTS, json_output=args.json) - if isinstance(data[args.url], str) or \ - isinstance(data[args.url], unicode): + if isinstance(data[args.url], str): data[args.url]["token"] = data[args.url] if args.bearer_token != "": -- cgit