From f0cb2c3dfeade9d8a7874daf094a49caa88ecdb0 Mon Sep 17 00:00:00 2001 From: "Martin A. Brown" Date: Thu, 10 Mar 2016 08:49:03 -0800 Subject: [PATCH] only try to remove files once --- tldp/doctypes/common.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tldp/doctypes/common.py b/tldp/doctypes/common.py index 2ee4775..5686086 100644 --- a/tldp/doctypes/common.py +++ b/tldp/doctypes/common.py @@ -66,14 +66,12 @@ class BaseDoctype(object): self.source = kwargs.get('source', None) self.output = kwargs.get('output', None) self.config = kwargs.get('config', None) - self.removals = list() + self.removals = set() assert self.source is not None assert self.output is not None assert self.config is not None def cleanup(self): - if self.config.script: - return stem = self.source.stem removals = getattr(self, 'removals', None) if removals: @@ -290,6 +288,10 @@ class BaseDoctype(object): # result = self.buildall(**kwargs) + # -- always clean the kitchen + # + self.cleanup() + # -- report on result and/or cleanup # if result: