コード例 #1
0
ファイル: rsync.py プロジェクト: mnaser/freezer
    def get_fs_meta_struct(self, fs_meta_path):
        fs_meta_struct = {}

        if os.path.isfile(fs_meta_path):
            with open(fs_meta_path) as meta_file:
                fs_meta_struct = json.loads(
                    compress.one_shot_decompress(self.compression_algo,
                                                 meta_file.read()))

        return fs_meta_struct
コード例 #2
0
ファイル: rsync.py プロジェクト: openstack/freezer
    def get_fs_meta_struct(self, fs_meta_path):
        fs_meta_struct = {}

        if os.path.isfile(fs_meta_path):
            with open(fs_meta_path) as meta_file:
                fs_meta_struct = json.loads(
                    compress.one_shot_decompress(self.compression_algo,
                                                 meta_file.read()))

        return fs_meta_struct
コード例 #3
0
ファイル: rsyncv2.py プロジェクト: openstack/freezer
    def get_fs_meta_struct(self, fs_meta_path):
        old_files_meta = {}

        if os.path.isfile(fs_meta_path):
            with open(fs_meta_path) as meta_file:
                old_files_meta = msgpack.loads(compress.one_shot_decompress(
                    self.compression_algo, meta_file.read()))

        old_fs_meta_struct = old_files_meta.get('files', {})
        rsync_bs = old_files_meta.get('rsync_block_size')

        return old_fs_meta_struct, rsync_bs
コード例 #4
0
    def get_fs_meta_struct(self, fs_meta_path):
        old_files_meta = {}

        if os.path.isfile(fs_meta_path):
            with open(fs_meta_path) as meta_file:
                old_files_meta = msgpack.loads(
                    compress.one_shot_decompress(self.compression_algo,
                                                 meta_file.read()))

        old_fs_meta_struct = old_files_meta.get('files', {})
        rsync_bs = old_files_meta.get('rsync_block_size')

        return old_fs_meta_struct, rsync_bs