Module acquisition.delete_step

Functions

def main()

Classes

class AcquisitionDeleteStep

Abstract class to describe an acquisition step.

You have to override this class.

Attributes

stop_flag : boolean
if True, stop the daemon as soon as possible.
debug_mode_allowed : boolean
if True, the debug mode is allowed.
step_limit : int
maximum step number (to avoid some loops).

Constructor.

Expand source code
class AcquisitionDeleteStep(AcquisitionStep):

    def process(self, xaf):
        self.info("Processing file: %s" % xaf.filepath)
        res = xaf.delete_or_nothing()
        if not res:
            self.warning("can't delete %s" % xaf.filepath)
            return False
        self.info("%s deleted" % xaf.filepath)
        return True

Ancestors

Inherited members