加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
bugfix-Don-t-generate-container-data-for-non-container-devi.patch 1.53 KB
一键复制 编辑 原始数据 按行查看 历史
xuxiaolong 提交于 2021-04-02 10:25 . sync 49 fixbug from github
From 0c3cb13730730da2edcc6567bec8256eee9b1770 Mon Sep 17 00:00:00 2001
From: Vendula Poncova <vponcova@redhat.com>
Date: Thu, 13 Aug 2020 12:39:40 +0200
Subject: [PATCH] Don't generate container data for non-container device types
If the current device type is not a container device type, don't generate
container data for the device factory request.
---
pyanaconda/modules/storage/partitioning/interactive/utils.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/pyanaconda/modules/storage/partitioning/interactive/utils.py b/pyanaconda/modules/storage/partitioning/interactive/utils.py
index 0057abd6e..04313eded 100644
--- a/pyanaconda/modules/storage/partitioning/interactive/utils.py
+++ b/pyanaconda/modules/storage/partitioning/interactive/utils.py
@@ -808,6 +808,7 @@ def generate_device_factory_request(storage, device) -> DeviceFactoryRequest:
if device_type is None:
raise UnsupportedDeviceError("Unsupported type of {}.".format(device.name))
+ # Generate the device data.
request = DeviceFactoryRequest()
request.device_spec = device.name
request.device_name = getattr(device.raw_device, "lvname", device.raw_device.name)
@@ -828,6 +829,10 @@ def generate_device_factory_request(storage, device) -> DeviceFactoryRequest:
request.disks = [d.name for d in disks]
+ if request.device_type not in CONTAINER_DEVICE_TYPES:
+ return request
+
+ # Generate the container data.
factory = devicefactory.get_device_factory(
storage,
device_type=device_type,
--
2.23.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化