Miscellany
public text v1 · immutableclass collision_protect(base):
required_csets = ('new_cset',)
_hooks = ('sanity_check',)
_engine_types = INSTALLING_MODES
def trigger(self, engine, cset):
l = []
for x in cset:
if os.path.isfile(x) and os.path.isfile(x.location):
l.append(x)
if engine.reporter is not None:
for x in l:
engine.reporter.warn("file already exists: %s", (x.location,))