Exemplo n.º 1
0
    def __init__(self, cfg, sudo_worker=None):
        self.config = cfg
        self.sudo_worker = sudo_worker

        self.mounted = False

        self.bup = BupWorker()
        self.bup_mounter = None

        # FS parents
        mount_cfg = self.config["mount"]
        mount_type = mount_cfg.get("type", "")
        if mount_type == "":
            self.parents = []
        elif mount_type == "google_drive":
            self.parents = [FuseGoogleDrive(mount_cfg)]
        elif mount_type == "sshfs":
            self.parents = [FuseSshfs(mount_cfg)]
        else:
            self.parents = [FuseRoot(mount_cfg)]

        if mount_cfg.get("encrypt", False):
            self.parents.append(FuseEncfs())