find_device_node: treat label=None as label=""
Since for a string there is no difference, we're just checking for this here.
This commit is contained in:
parent
fa099e1a37
commit
1d9e80555d
@ -214,6 +214,10 @@ def find_device_node(device, fs_type=None, label=None, valid_targets=None,
|
||||
|
||||
Note: This works with GPT partition tables!
|
||||
"""
|
||||
# label of None is same as no label
|
||||
if label is None:
|
||||
label = ""
|
||||
|
||||
if not valid_targets:
|
||||
valid_targets = ['disk', 'part']
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user