Skip to content
Snippets Groups Projects
Commit 4b4e2213 authored by Rohit Gupta's avatar Rohit Gupta
Browse files

fixed bugs related to COTS UE

parent cd71443d
No related branches found
No related tags found
No related merge requests found
...@@ -59,6 +59,7 @@ def send_command (cmd, response, timeout): ...@@ -59,6 +59,7 @@ def send_command (cmd, response, timeout):
count=0 count=0
sleep_duration = 1 sleep_duration = 1
while count <= timeout: while count <= timeout:
try:
ser.write (cmd + '\r\n') ser.write (cmd + '\r\n')
out = '' out = ''
time.sleep(sleep_duration) time.sleep(sleep_duration)
...@@ -68,7 +69,11 @@ def send_command (cmd, response, timeout): ...@@ -68,7 +69,11 @@ def send_command (cmd, response, timeout):
print 'out = <' + out + '> response = <' + response + '> \n' print 'out = <' + out + '> response = <' + response + '> \n'
if re.search(response, out): if re.search(response, out):
break break
except Exception, e:
error = ' cmd : ' + cmd + ' response : ' + response
error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e)
error = error + traceback.format_exc()
print error
def start_ue () : def start_ue () :
......
...@@ -20,7 +20,7 @@ file.close() ...@@ -20,7 +20,7 @@ file.close()
if keyword == 'mme_ip_address': if keyword == 'mme_ip_address':
#string = (re.sub(r"mme_ip_address\s*=\s*\([^\$]+)\)\s*;\s*", r"<% tex \1 %>", t, re.M) #string = (re.sub(r"mme_ip_address\s*=\s*\([^\$]+)\)\s*;\s*", r"<% tex \1 %>", t, re.M)
replacement_text = keyword + ' = ' + replacement_text + ' ; ' replacement_text = keyword + ' = ({' + replacement_text + ')} ; '
string = re.sub(r"mme_ip_address\s*=\s*\(([^\$]+?)\)\s*;", replacement_text, string, re.M) string = re.sub(r"mme_ip_address\s*=\s*\(([^\$]+?)\)\s*;", replacement_text, string, re.M)
elif keyword == 'N_RB_DL': elif keyword == 'N_RB_DL':
replacement_text = keyword + ' = ' + replacement_text + ' ; ' replacement_text = keyword + ' = ' + replacement_text + ' ; '
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment