Selaa lähdekoodia

Provide better error message when setting RHS attributes.

bentleyjoakes 6 vuotta sitten
vanhempi
commit
22b64c8bed
1 muutettua tiedostoa jossa 3 lisäystä ja 2 poistoa
  1. 3 2
      mt/ptcal/pytcore/core/himesis.py

+ 3 - 2
mt/ptcal/pytcore/core/himesis.py

@@ -443,9 +443,10 @@ class HimesisPostConditionPattern(HimesisPattern):
                         # Not 'really' an attribute
                         continue
                     oldVal = None
-                    if not newNode :
-                        oldVal = graph.vs[graphNodeIndex][attrName]
                     try :
+                        if not newNode :
+                            oldVal = graph.vs[graphNodeIndex][attrName]
+
                         newVal = self.vs[rhsNodeIndex][attrName](pLabel2graphIndexMap, graph)
                         if oldVal != newVal :
                             graph.vs[graphNodeIndex][attrName] = newVal