add exception

This commit is contained in:
xiaofei.sun 2017-06-11 09:38:59 +08:00
parent aacf9f0a44
commit c0b1f57fc0

View File

@ -791,7 +791,7 @@ class Schedule(object):
log.debug('schedule.handle_func: Removing {0}'.format(proc_fn))
os.unlink(proc_fn)
except OSError as exc:
except Exception as exc:
if exc.errno == errno.EEXIST or exc.errno == errno.ENOENT:
# EEXIST and ENOENT are OK because the file is gone and that's what
# we wanted