From: Guillaume Abrioux Date: Wed, 8 Jan 2025 12:45:34 +0000 (+0000) Subject: ceph-volume: set default value for BlueStore.block_lv to None X-Git-Tag: testing/wip-hyelloji-testing-20250127.141229~21^2~16 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4b0c3bbed377e1ee5ae7e4a765741f9a877935ef;p=ceph-ci.git 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 --- diff --git a/src/ceph-volume/ceph_volume/objectstore/bluestore.py b/src/ceph-volume/ceph_volume/objectstore/bluestore.py index ceaa199a18b..535551b516d 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: """