diff src/tools/memory.py @ 396:cecd22241d56

memory: avoid duplicate in getParamsCategories
author Goffi <goffi@goffi.org>
date Tue, 04 Oct 2011 23:43:06 +0200
parents 79fe50fc8edc
children cb0285372818
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@'):