summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorSahina Bose <sabose@redhat.com>2014-12-02 11:16:56 +0530
committerSahina Bose <sabose@redhat.com>2014-12-02 20:14:04 -0800
commit1f77b834ac27b73f209496a5e0358fb0f107de6f (patch)
treec4cf99814d97bf785be631ad84790c5277ca38fc /plugins
parentde2d81b459e8674e49d4993b15b5d383f72c301e (diff)
plugins: Fixed issue with str comparisonv1.0.0
Wrongly used str.contains in python. Fixed this Change-Id: Idea139329dc430294fc016b30db2578335bb3666 Bug-Url: https://bugzilla.redhat.com/1109752 Signed-off-by: Sahina Bose <sabose@redhat.com> Reviewed-on: http://review.gluster.org/9226 Reviewed-by: Ramesh N <rnachimu@redhat.com> Reviewed-by: kasturi narra <kasturi.narra@gmail.com> Reviewed-by: Kanagaraj M <kmayilsa@redhat.com>
Diffstat (limited to 'plugins')
-rwxr-xr-xplugins/check_vol_server.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/check_vol_server.py b/plugins/check_vol_server.py
index 4e42025..e7dd150 100755
--- a/plugins/check_vol_server.py
+++ b/plugins/check_vol_server.py
@@ -226,11 +226,11 @@ def _executeRandomHost(hostgroup, command):
#the command is successful
#No need to send it to host which we already sent unless volume locked
- if not output.contains("UNKNOWN: temporary error"):
+ if not "UNKNOWN: temporary error" in output:
# if volume locked,we can try on same host
list_hosts.remove(host)
for host in list_hosts:
- if output.contains("UNKNOWN: temporary error"):
+ if "UNKNOWN: temporary error" in output:
# volume locked, so wait before trying again
time.sleep(2) # sleep for 2 seconds
host_address = _getHostAddress(host)