Commit 6c434118 authored by Lionel Gauthier's avatar Lionel Gauthier

handle not existing msc log file

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7194 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 53585b0a
......@@ -9,8 +9,8 @@ import subprocess
import re
import socket
import datetime
import os.path
from datetime import date
import os, errno
MSCGEN_OUTPUT_TYPE = "png"
MAX_MESSAGES_PER_PAGE = 36
......@@ -69,6 +69,8 @@ def parse_oai_log_files():
global g_final_display_order_list
#open TXT file that contain OAI filtered traces for mscgen
filenames = [
'/tmp/openair.msc.ip_ue.log',
'/tmp/openair.msc.ip_enb.log',
'/tmp/openair.msc.nas_ue.log',
'/tmp/openair.msc.pdcp_ue.log',
'/tmp/openair.msc.rrc_ue.log',
......@@ -87,6 +89,7 @@ def parse_oai_log_files():
'/tmp/openair.msc.s1ap_mme.log']
for filename in filenames:
try:
fhandle = open(filename, 'r')
fcontent = fhandle.read()
fhandle.close()
......@@ -162,6 +165,10 @@ def parse_oai_log_files():
Message['text_color'] = g_display_color[entity_id]
g_messages[event_id] = Message
except IOError, e:
print 'errno:', ioex.errno
print 'err code:', errno.errorcode[ioex.errno]
print 'err message:', os.strerror(ioex.errno)
#print("------------------------------------")
#print (" %s " % ( g_messages ) )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment