From 1e548d30e5a66467da8fa66d00ab8cf25958cba3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=C3=89vrard?= Date: Thu, 2 May 2019 12:11:35 +0200 Subject: [PATCH] Remove _FileCache file from the FS when they're not used anymore issue8311 review261391002 --- tryton/gui/window/view_form/model/field.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tryton/gui/window/view_form/model/field.py b/tryton/gui/window/view_form/model/field.py index c604024552..097bb93e0f 100644 --- a/tryton/gui/window/view_form/model/field.py +++ b/tryton/gui/window/view_form/model/field.py @@ -905,6 +905,12 @@ class _FileCache(object): def __init__(self, path): self.path = path + def __del__(self): + try: + os.remove(self.path) + except IOError: + pass + class BinaryField(Field):