From 86d16d2a98af540ba458721edc2ac8a530c01635 Mon Sep 17 00:00:00 2001 From: kshithijiyer Date: Wed, 8 Jan 2020 15:53:31 +0530 Subject: [py2to3] Change str to list in isinstance() Use 'list' object type in comparisons instead of 'str' Because it is differently treated in py2 and py3. Example: In py2 isinstance(u'foo', str) is False In py3 isinstance(u'foo', str) is True Change-Id: I7663d42494bf59d74550ff4897379d35cc357db4 Signed-off-by: kshithijiyer --- glustolibs-gluster/glustolibs/gluster/snap_scheduler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'glustolibs-gluster/glustolibs/gluster/snap_scheduler.py') diff --git a/glustolibs-gluster/glustolibs/gluster/snap_scheduler.py b/glustolibs-gluster/glustolibs/gluster/snap_scheduler.py index 4493cf40f..f0ccbf547 100644 --- a/glustolibs-gluster/glustolibs/gluster/snap_scheduler.py +++ b/glustolibs-gluster/glustolibs/gluster/snap_scheduler.py @@ -36,7 +36,7 @@ def scheduler_init(servers): scheduler_init("abc.com") """ - if isinstance(servers, str): + if not isinstance(servers, list): servers = [servers] cmd = "snap_scheduler.py init" -- cgit