From 951c701a328f74b4c03df2c11dc17ff39cacd8d7 Mon Sep 17 00:00:00 2001 From: Benoit Chesneau Date: Tue, 16 Feb 2010 15:52:08 +0100 Subject: [PATCH] make sure tempfile of workers is removed. --- gunicorn/arbiter.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gunicorn/arbiter.py b/gunicorn/arbiter.py index 19a03699..01742561 100644 --- a/gunicorn/arbiter.py +++ b/gunicorn/arbiter.py @@ -354,8 +354,9 @@ class Arbiter(object): except OSError, e: if e.errno == errno.ESRCH: worker = self.WORKERS.pop(pid) - try: - worker.tmp.close() - except: - pass raise + finally: + try: + worker.tmp.close() + except: + pass