From e860f32d51cd059bcea7797df30614b7dab495c3 Mon Sep 17 00:00:00 2001 From: "Craig J. Anderson" Date: Fri, 25 May 2012 23:43:40 +0000 Subject: [PATCH] more code clean up. clean up only. svn: r19653 --- src/plugins/lib/libsubstkeyword.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/plugins/lib/libsubstkeyword.py b/src/plugins/lib/libsubstkeyword.py index 601c5619b..16e89186f 100644 --- a/src/plugins/lib/libsubstkeyword.py +++ b/src/plugins/lib/libsubstkeyword.py @@ -118,6 +118,8 @@ class GenericFormat(object): tmp = tmp.upper() if tmp == "" or tmp is None: main.add_remove() + elif isinstance(tmp, VarString): #events cause this + main.extend(tmp) else: main.add_variable(tmp) elif separator.is_a(): @@ -128,10 +130,7 @@ class GenericFormat(object): if self.string_in.this == ")": self.string_in.step() - if main.state == TXT.remove: - return None - else: - return main.get_final()[1] + return main #------------------------------------------------------------------------ # Name Format strings @@ -943,6 +942,8 @@ class SubstKeywords(object): rtrn = variable.parse_format() if rtrn is None: curr_var.add_remove() + elif isinstance(rtrn, VarString): + curr_var.extend(rtrn) else: curr_var.add_variable(rtrn)