[Checkins] SVN: van.pydeb/trunk/van/pydeb/__init__.py Do not break on duplicate keys in reverse map, prefer the first entry.

Marius Gedminas cvs-admin at zope.org
Fri Aug 16 15:36:55 CEST 2013


Log message for revision 130297:
  Do not break on duplicate keys in reverse map, prefer the first entry.
  

Changed:
  U   van.pydeb/trunk/van/pydeb/__init__.py

-=-
Modified: van.pydeb/trunk/van/pydeb/__init__.py
===================================================================
--- van.pydeb/trunk/van/pydeb/__init__.py	2013-08-16 13:18:24 UTC (rev 130296)
+++ van.pydeb/trunk/van/pydeb/__init__.py	2013-08-16 13:36:55 UTC (rev 130297)
@@ -69,8 +69,9 @@
                 raise Exception("Unknown option %s" % option)
             assert k not in map, "Duplicate key %s already in map. File %s" % (k, file)
             map[k] = (v, optdict)
-            assert v not in reverse_map, "Duplicate key %s already in reverse map. File %s" % (v, file)
-            reverse_map[v] = (k, optdict)
+            #assert v not in reverse_map, "Duplicate key %s already in reverse map. File %s" % (v, file)
+            if v not in reverse_map:
+                reverse_map[v] = (k, optdict)
     finally:
         f.close()
     return map, reverse_map



More information about the checkins mailing list