changeset 677:44df078187b9 frontends_multi_profiles

browser side: fixed __setitem__ in OrderedDict (was bugging when the key was already existing)
author Goffi <goffi@goffi.org>
date Tue, 17 Mar 2015 22:18:25 +0100
parents 849ffb24d5bf
children 2e087e093e7f
files src/browser/collections.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/browser/collections.py	Tue Mar 17 20:42:02 2015 +0100
+++ b/src/browser/collections.py	Tue Mar 17 22:18:25 2015 +0100
@@ -36,7 +36,8 @@
         return len(self.__keys)
 
     def __setitem__(self, key, value):
-        self.__keys.append(key)
+        if key not in self.__keys:
+            self.__keys.append(key)
         self.__internal_dict[key] = value
 
     def __getitem__(self, key):