misc.py: Make process cleanup more robust

Eliminate a far chance of an exception thrown during process cleanup.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2017-11-22 09:52:22 +01:00
commit ef79027b06

View file

@ -6,7 +6,7 @@ _tmpfiles = set()
def _cleanup(): def _cleanup():
for f in _tmpfiles: for f in _tmpfiles:
os.unlink(f) silentremove(f)
def silentremove(filename): #export def silentremove(filename): #export
try: try: