diff --git a/cmake_targets/autotests/run_exec_lte-softmodem_tests.py b/cmake_targets/autotests/run_exec_lte-softmodem_tests.py
index 625c88d3b5b37ca8b03ae08bbe06bc9177561a10..27a4bcacd88a1ddecee090b774843ebd35ceab20 100755
--- a/cmake_targets/autotests/run_exec_lte-softmodem_tests.py
+++ b/cmake_targets/autotests/run_exec_lte-softmodem_tests.py
@@ -258,9 +258,9 @@ def finalize_deploy_script (timeout_cmd, terminate_missing_procs='True'):
 # \param logdirRepo directory of remote repository
 # \param python_script python script location
 def update_config_file(oai, config_string, logdirRepo, python_script):
+  cmd=""
   if config_string :
     stringArray = config_string.splitlines()
-    cmd=""
     #python_script = '$OPENAIR_DIR/targets/autotests/tools/search_repl.py'
     for string in stringArray:
        #split the string based on space now