From f7099ef96dfced59f580e3266b05bc2ef11477c4 Mon Sep 17 00:00:00 2001 From: Rohit Gupta <rohit.gupta@eurecom.fr> Date: Wed, 11 Nov 2015 18:56:57 +0100 Subject: [PATCH] fixed a bug in search/replace python script --- cmake_targets/autotests/tools/search_repl.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) mode change 100644 => 100755 cmake_targets/autotests/tools/search_repl.py diff --git a/cmake_targets/autotests/tools/search_repl.py b/cmake_targets/autotests/tools/search_repl.py old mode 100644 new mode 100755 index ac62e15eb5..0a91945c77 --- a/cmake_targets/autotests/tools/search_repl.py +++ b/cmake_targets/autotests/tools/search_repl.py @@ -22,12 +22,12 @@ if keyword == 'mme_ip_address': #string = (re.sub(r"mme_ip_address\s*=\s*\([^\$]+)\)\s*;\s*", r"<% tex \1 %>", t, re.M) replacement_text = keyword + ' = ( { ' + replacement_text + ' } ) ; ' string = re.sub(r"mme_ip_address\s*=\s*\(([^\$]+?)\)\s*;", replacement_text, string, re.M) -elif keyword == 'N_RB_DL': +else : replacement_text = keyword + ' = ' + replacement_text + ' ; ' string = re.sub(r"%s\s*=\s*([^\$]+?)\s*;" % keyword , replacement_text, string, re.M) -else : - replacement_text = keyword + ' = \" ' + replacement_text + '\" ; ' - string = re.sub(r"%s\s*=\s*\"([^\$]+?)\"\s*;" % keyword , replacement_text, string, re.M) +#else : +# replacement_text = keyword + ' =\"' + replacement_text + '\" ; ' +# string = re.sub(r"%s\s*=\s*\"([^\$]+?)\"\s*;" % keyword , replacement_text, string, re.M) file = open(filename, 'w') file.write(string) -- GitLab