def modify_handler(self, filecmd): if filecmd.dataref is not None: data = self.cache_mgr.fetch_blob(filecmd.dataref) else: data = filecmd.data self.debug("modifying %s", filecmd.path) (kind, is_executable) = mode_to_kind(filecmd.mode) self._modify_item(self._decode_path(filecmd.path), kind, is_executable, data, self.inventory)
def modify_handler(self, filecmd): (kind, executable) = mode_to_kind(filecmd.mode) if filecmd.dataref is not None: if kind == "directory": data = None elif kind == "tree-reference": data = filecmd.dataref else: data = self.cache_mgr.fetch_blob(filecmd.dataref) else: data = filecmd.data self.debug("modifying %s", filecmd.path) decoded_path = self._decode_path(filecmd.path) self._modify_item(decoded_path, kind, executable, data, self.basis_inventory)