Francesco Romani has uploaded a new change for review.

Change subject: gluster: use the any() builtin
......................................................................

gluster: use the any() builtin

use any() instead of 'True' in collection.
Tiny cleanup patch found while fixing the complains of pep8 1.5.5.

Change-Id: Ieb4bbf6e3ad64d4860f65dcba3fe88fab7472262
Signed-off-by: Francesco Romani <[email protected]>
---
M vdsm/gluster/hooks.py
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/65/26765/1

diff --git a/vdsm/gluster/hooks.py b/vdsm/gluster/hooks.py
index 9a7904f..1d662bc 100644
--- a/vdsm/gluster/hooks.py
+++ b/vdsm/gluster/hooks.py
@@ -213,11 +213,11 @@
                                                   hookLevel.lower(), hookName)
     hookStat = [os.path.exists(enabledFile), os.path.exists(disabledFile)]
     if update:
-        if True not in hookStat:
+        if not any(hookStat):
             raise ge.GlusterHookNotFoundException(glusterCmd, hookLevel,
                                                   hookName)
     else:
-        if True in hookStat:
+        if any(hookStat):
             raise ge.GlusterHookAlreadyExistException(glusterCmd, hookLevel,
                                                       hookName)
     content = base64.b64decode(hookData)


-- 
To view, visit http://gerrit.ovirt.org/26765
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieb4bbf6e3ad64d4860f65dcba3fe88fab7472262
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to