fixed an issue that null string exists in mountpoint list

In function snapshot.lvm.get_lvm_info(), filter null string members
before return the mountpoint list.

Change-Id: Iae07dd081cafe92fa63c90a0d4bf967ec7206ea5
Closes-Bug:1874492
changes/04/722404/1
Haosheng He 3 years ago
parent 851a17173b
commit d199ac6732

@ -215,7 +215,7 @@ def get_lvm_info(path):
['mount'], stdout=subprocess.PIPE, stderr=subprocess.PIPE,
env=os.environ)
mount_out, mount_err = mount_process.communicate()
mount_points = mount_out.split('\n')
mount_points = [m for m in mount_out.split('\n') if m]
lvm_volgroup, lvm_srcvol, lvm_device = lvm_guess(
mount_point_path, mount_points, 'mount')

Loading…
Cancel
Save