]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
ceph-volume: Fix unbound var in disk.get_devices()
authorZack Cerza <zack@redhat.com>
Thu, 7 Sep 2023 18:58:22 +0000 (11:58 -0700)
committerZack Cerza <zack@redhat.com>
Thu, 7 Sep 2023 18:58:22 +0000 (11:58 -0700)
00ba00fdfab8 looks to have regressed.

Signed-off-by: Zack Cerza <zack@redhat.com>
src/ceph-volume/ceph_volume/util/disk.py

index a96b0f0a7f84a596d5312bbdf7819b191eff9953..0a59cb0ba1cfbc1223c923e4f6c19de9199fd213 100644 (file)
@@ -878,6 +878,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)