changeset 396:cecd22241d56

memory: avoid duplicate in getParamsCategories
author Goffi <goffi@goffi.org>
date Tue, 04 Oct 2011 23:43:06 +0200
parents 79fe50fc8edc
children ccfd69d090c3
files src/tools/memory.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/tools/memory.py	Tue Oct 04 23:22:13 2011 +0200
+++ b/src/tools/memory.py	Tue Oct 04 23:43:06 2011 +0200
@@ -376,7 +376,9 @@
         """return the categories availables"""
         categories=[]
         for cat in self.dom.getElementsByTagName("category"):
-            categories.append(cat.getAttribute("name"))
+            name = cat.getAttribute("name")
+            if name not in categories:
+                categories.append(cat.getAttribute("name"))
         return categories
 
     def setParam(self, name, value, category, profile_key='@NONE@'):