From e4f048457d60e606c424b59a34e8020fbfc34f22 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Wed, 8 Jan 2025 12:45:34 +0000 Subject: [PATCH] ceph-volume: set default value for BlueStore.block_lv to None This change updates the `BlueStore` class in `ceph_volume.objectstore` by initializing the `block_lv` attribute to `None` with the type `Optional[Volume]`. This ensures that the attribute has a default value and avoids potential runtime errors when the attribute is accessed before being explicitly assigned. Signed-off-by: Guillaume Abrioux (cherry picked from commit 4b0c3bbed377e1ee5ae7e4a765741f9a877935ef) --- src/ceph-volume/ceph_volume/objectstore/bluestore.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ceph-volume/ceph_volume/objectstore/bluestore.py b/src/ceph-volume/ceph_volume/objectstore/bluestore.py index ceaa199a18b7f..535551b516d43 100644 --- a/src/ceph-volume/ceph_volume/objectstore/bluestore.py +++ b/src/ceph-volume/ceph_volume/objectstore/bluestore.py @@ -25,7 +25,7 @@ class BlueStore(BaseObjectStore): self.block_device_path: str = '' self.wal_device_path: str = '' self.db_device_path: str = '' - self.block_lv: Volume + self.block_lv: Optional[Volume] = None def add_objectstore_opts(self) -> None: """ -- 2.39.5