[node-patches] Change in ovirt-node[master]: Add if statement to avoid duplicate elements in "funcs" list

hadong0720 at gmail.com hadong0720 at gmail.com
Sun Oct 27 08:36:31 UTC 2013


hadong has uploaded a new change for review.

Change subject: Add if statement to avoid duplicate elements in "funcs" list
......................................................................

Add if statement to avoid duplicate elements in "funcs" list

Change-Id: I1c1aabe95c4cae1b88fbca3dad62c19d61d19335
Signed-off-by: hadong <hadong0720 at gmail.com>
---
M src/ovirt/node/tools/password.py
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/69/20569/1

diff --git a/src/ovirt/node/tools/password.py b/src/ovirt/node/tools/password.py
index f2a1689..6229a0a 100644
--- a/src/ovirt/node/tools/password.py
+++ b/src/ovirt/node/tools/password.py
@@ -62,7 +62,8 @@
                 doc = getattr(self, name).__doc__
                 doc = doc or ""
                 doc = doc.strip()
-                funcs.append((name[3:], doc))
+                if not (name[3:], doc) in funcs:
+                    funcs.append((name[3:], doc)
 
         max_name_len = max(len(n) for n, d in funcs if d)
 


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1c1aabe95c4cae1b88fbca3dad62c19d61d19335
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: hadong <hadong0720 at gmail.com>



More information about the node-patches mailing list