代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/anaconda 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 5cb9170cafc3f81193fd872a21933a0fa2bd5f2c Mon Sep 17 00:00:00 2001
From: Vendula Poncova <vponcova@redhat.com>
Date: Mon, 6 Jul 2020 14:04:28 +0200
Subject: [PATCH] Create the initial storage model during the initialization
After connecting all objects of the Storage service to signals, create
the initial storage model. It will be propagated to all these objects.
Otherwise, the objects might raise the UnavailableStorageError exception.
(cherry-picked from a commit fabc9a0)
---
pyanaconda/modules/storage/storage.py | 4 ++++
tests/nosetests/pyanaconda_tests/module_storage_test.py | 5 +++++
2 files changed, 9 insertions(+)
diff --git a/pyanaconda/modules/storage/storage.py b/pyanaconda/modules/storage/storage.py
index 9c5aff943..08254b0ce 100644
--- a/pyanaconda/modules/storage/storage.py
+++ b/pyanaconda/modules/storage/storage.py
@@ -133,6 +133,10 @@ class StorageService(KickstartService):
self.on_protected_devices_changed
)
+ # After connecting modules to signals, create the initial
+ # storage model. It will be propagated to all modules.
+ self._set_storage(create_storage())
+
def _add_module(self, storage_module):
"""Add a base kickstart module."""
self._modules.append(storage_module)
diff --git a/tests/nosetests/pyanaconda_tests/module_storage_test.py b/tests/nosetests/pyanaconda_tests/module_storage_test.py
index 708981233..6bb1723d5 100644
--- a/tests/nosetests/pyanaconda_tests/module_storage_test.py
+++ b/tests/nosetests/pyanaconda_tests/module_storage_test.py
@@ -120,6 +120,11 @@ class StorageInterfaceTestCase(unittest.TestCase):
storage_reset_callback = Mock()
self.storage_module.partitioning_reset.connect(storage_reset_callback)
+ self.assertIsNotNone(self.storage_module.storage)
+ storage_changed_callback.assert_not_called()
+ storage_reset_callback.assert_not_called()
+
+ self.storage_module._current_storage = None
self.assertIsNotNone(self.storage_module.storage)
storage_changed_callback.assert_called_once()
storage_reset_callback.assert_not_called()
--
2.23.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。