def __init__(self, data, storage, payload, device, mount_data): super().__init__(data, storage, payload) self.title = N_("Configure device: %s") % mount_data[MOUNT_POINT_DEVICE] self._container = None self._supported_filesystems = [fmt.type for fmt in get_supported_filesystems()] self._mount_data = mount_data self._device = device
def __init__(self, data, storage, payload, device, request): super().__init__(data, storage, payload) self.title = N_("Configure device: %s") % request.device_spec self._container = None self._supported_filesystems = [fmt.type for fmt in get_supported_filesystems()] self._request = request self._device = device
def __init__(self, data, storage, payload, device, mount_data): super().__init__(data, storage, payload) self.title = N_( "Configure device: %s") % mount_data[MOUNT_POINT_DEVICE] self._container = None self._supported_filesystems = [ fmt.type for fmt in get_supported_filesystems() ] self._mount_data = mount_data self._device = device
def collect_file_system_types(device): """Collect supported file system types for the given device. :param device: a device :return: a list of file system names """ # Collect the supported filesystem types. supported_types = { fs.name for fs in get_supported_filesystems() if fs.name not in UNSUPPORTED_FILESYSTEMS } # Add possibly unsupported but still required file system types: # Add the device format type. supported_types.add(device.format.name) # Add the original device format type. if device.exists: supported_types.add(device.original_format.name) return list(supported_types)
def get_supported_file_systems(self): """Get the supported types of filesystems. :return: a list of filesystem names """ return [fmt.type for fmt in get_supported_filesystems() if fmt.type]