Commit 2fdc6af8 authored by Jason Madden's avatar Jason Madden

Try a few times

parent 27667b64
......@@ -122,8 +122,16 @@ else:
results = dict()
gc.disable()
try:
process = psutil.Process()
results['data'] = process.open_files() + process.connections('all')
for _ in range(3):
try:
process = psutil.Process()
results['data'] = process.open_files() + process.connections('all')
break
except OSError:
pass
else:
# No break executed
raise unittest.SkipTest("Unable to read open files")
finally:
gc.enable()
for x in results['data']:
......
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