Skip to content

Commit

Permalink
Merge "Checking for error in file open" into R3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed May 14, 2016
2 parents 979e986 + a447b5d commit e1d1364
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/nodemgr/vrouter_nodemgr/vrouter_process_stat.py
Expand Up @@ -23,8 +23,13 @@ def get_vrouter_process_info(self, proc_name):
if file.endswith(".ini"):
filename = \
'/etc/contrail/supervisord_vrouter_files/' + file
data = StringIO('\n'.join(line.strip()
try:
data = StringIO('\n'.join(line.strip()
for line in open(filename)))
except IOError:
msg = "This file does not exist anymore so continuing: "
sys.stderr.write(msg + filename + "\n")
continue
Config = ConfigParser.SafeConfigParser()
Config.readfp(data)
sections = Config.sections()
Expand Down

0 comments on commit e1d1364

Please sign in to comment.