From 1f77b834ac27b73f209496a5e0358fb0f107de6f Mon Sep 17 00:00:00 2001 From: Sahina Bose Date: Tue, 2 Dec 2014 11:16:56 +0530 Subject: plugins: Fixed issue with str comparison Wrongly used str.contains in python. Fixed this Change-Id: Idea139329dc430294fc016b30db2578335bb3666 Bug-Url: https://bugzilla.redhat.com/1109752 Signed-off-by: Sahina Bose Reviewed-on: http://review.gluster.org/9226 Reviewed-by: Ramesh N Reviewed-by: kasturi narra Reviewed-by: Kanagaraj M --- plugins/check_vol_server.py | 4 ++-- 1 file 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) -- cgit