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

Try a few times

parent 27667b64
...@@ -121,9 +121,17 @@ else: ...@@ -121,9 +121,17 @@ else:
gc.collect() gc.collect()
results = dict() results = dict()
gc.disable() gc.disable()
try:
for _ in range(3):
try: try:
process = psutil.Process() process = psutil.Process()
results['data'] = process.open_files() + process.connections('all') 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: finally:
gc.enable() gc.enable()
for x in results['data']: 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