summaryrefslogtreecommitdiffstats
path: root/glustolibs-gluster
diff options
context:
space:
mode:
Diffstat (limited to 'glustolibs-gluster')
-rwxr-xr-xglustolibs-gluster/glustolibs/gluster/lib_utils.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/glustolibs-gluster/glustolibs/gluster/lib_utils.py b/glustolibs-gluster/glustolibs/gluster/lib_utils.py
index 61498176d..516cd76c8 100755
--- a/glustolibs-gluster/glustolibs/gluster/lib_utils.py
+++ b/glustolibs-gluster/glustolibs/gluster/lib_utils.py
@@ -975,7 +975,7 @@ def add_user(servers, username, group=None):
else:
cmd = "useradd -G %s %s" % (group, username)
- if servers != list:
+ if not isinstance(servers, list):
servers = [servers]
results = g.run_parallel(servers, cmd)
@@ -1019,7 +1019,7 @@ def group_add(servers, groupname):
False otherwise.
"""
- if servers != list:
+ if not isinstance(servers, list):
servers = [servers]
cmd = "groupadd %s" % groupname
@@ -1093,7 +1093,7 @@ def set_passwd(servers, username, passwd):
False otherwise.
"""
- if servers != list:
+ if not isinstance(servers, list):
servers = [servers]
cmd = "echo %s:%s | chpasswd" % (username, passwd)
results = g.run_parallel(servers, cmd)