From: Zack Cerza Date: Thu, 7 Sep 2023 18:58:22 +0000 (-0700) Subject: ceph-volume: Fix unbound var in disk.get_devices() X-Git-Tag: v18.2.5~412^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F59262%2Fhead;p=ceph.git ceph-volume: Fix unbound var in disk.get_devices() 00ba00fdfab8 looks to have regressed. Signed-off-by: Zack Cerza (cherry picked from commit 0e95b27402e46c34586f460d2140af48d03fa305) --- diff --git a/src/ceph-volume/ceph_volume/util/disk.py b/src/ceph-volume/ceph_volume/util/disk.py index 2984c391d069..a0bc39b9d179 100644 --- a/src/ceph-volume/ceph_volume/util/disk.py +++ b/src/ceph-volume/ceph_volume/util/disk.py @@ -865,6 +865,7 @@ def get_devices(_sys_block_path='/sys/block', device=''): for key, file_ in facts: metadata[key] = get_file_contents(os.path.join(sysdir, file_)) + device_slaves = [] if block[2] != 'part': device_slaves = os.listdir(os.path.join(sysdir, 'slaves')) metadata['partitions'] = get_partitions_facts(sysdir)