Commit ef9194aa authored by Lionel Gauthier's avatar Lionel Gauthier

clean stdout

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7286 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent e730b678
...@@ -86,7 +86,8 @@ def sequence_number_generator(): ...@@ -86,7 +86,8 @@ def sequence_number_generator():
g_sequence_generator = g_sequence_generator + 1 g_sequence_generator = g_sequence_generator + 1
return l_seq return l_seq
def file_is_empty(fpath):
return False if os.path.isfile(fpath) and os.path.getsize(fpath) > 0 else True
def parse_oai_log_files(): def parse_oai_log_files():
global g_entities_dic global g_entities_dic
...@@ -124,6 +125,8 @@ def parse_oai_log_files(): ...@@ -124,6 +125,8 @@ def parse_oai_log_files():
# we may insert diagnostic events # we may insert diagnostic events
event_id_offset = 0 event_id_offset = 0
for filename in filenames: for filename in filenames:
if file_is_empty(filename):
continue
try: try:
fhandle = open(filename, 'r') fhandle = open(filename, 'r')
fcontent = fhandle.read() fcontent = fhandle.read()
...@@ -224,7 +227,7 @@ def parse_oai_log_files(): ...@@ -224,7 +227,7 @@ def parse_oai_log_files():
g_messages[event_id + event_id_offset] = Message g_messages[event_id + event_id_offset] = Message
except IOError, e: except IOError, e:
print ("INPUT LINE: %s " % line) print ("File %s INPUT LINE: %s " % (filename, line))
print 'err message' print 'err message'
#print("------------------------------------") #print("------------------------------------")
......
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