From 1319af2b6cd4631a28a969a4cb54f2f25b8ab8d5 Mon Sep 17 00:00:00 2001
From: Sebastian Koslowski <koslowski@kit.edu>
Date: Tue, 17 May 2016 13:24:54 +0200
Subject: grc: faulty callback code if setter call contained a variable block
 id

(do-over of c85984f105106ff0a7e3b387d680e0f2f5884d55)

If a block contains a callback of the form

    self.block_id.param = $param

the generators subst routine produced

    self.block_id.self.param = self.param

due to a faulty splitting of the expression in expr_utils.py.

This should fix this problem by not tokenizing "VAR0.VAR1".
---
 grc/core/utils/expr_utils.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'grc/core/utils/expr_utils.py')

diff --git a/grc/core/utils/expr_utils.py b/grc/core/utils/expr_utils.py
index 240b99e7a1..2059ceff9f 100644
--- a/grc/core/utils/expr_utils.py
+++ b/grc/core/utils/expr_utils.py
@@ -99,7 +99,7 @@ def expr_replace(expr, replace_dict):
     Returns:
         a new expression with the prepend
     """
-    expr_splits = expr_split(expr)
+    expr_splits = expr_split(expr, var_chars=VAR_CHARS + '.')
     for i, es in enumerate(expr_splits):
         if es in replace_dict.keys():
             expr_splits[i] = replace_dict[es]
-- 
cgit v1.2.3