]> hydra-www.ietfng.org Git - dyna2/commitdiff
FIX: accidently delete on unchanged values
authortimv <tim.f.vieira@gmail.com>
Wed, 12 Dec 2012 20:46:27 +0000 (15:46 -0500)
committertimv <tim.f.vieira@gmail.com>
Wed, 12 Dec 2012 20:46:27 +0000 (15:46 -0500)
bin/stdlib.py

index acfb526495ef6ddbc755135d656fedf8e5f0216d..a9ffe5341e8713da0c919fed0dcdcd64eabebaab 100644 (file)
@@ -237,9 +237,6 @@ def _run():
 
         was = chart[fn].data[idx][-1]  # last cell is val
 
-        if was is not None:
-            delete(item, was)
-
         now = aggregate(item)   # compute new val for item
 
         print '    was %s  now %s' % (was, now)
@@ -248,6 +245,9 @@ def _run():
             print '    unchanged'
             continue
 
+        if was is not None:
+            delete(item, was)
+
         chart[fn].data[idx][-1] = now
 
         update_dispatcher(item, now)