All pastes #210290 Raw Edit

Miscellany

public text v1 · immutable
#210290 ·published 2006-10-19 17:15 UTC
rendered paste body
class 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,))