From 2cb3d6f52c9d1ee803f151c1aacda355974fb083 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Fri, 27 Sep 2013 17:08:40 -0400 Subject: find_device_node: treat label=None as label="" Since for a string there is no difference, we're just checking for this here. --- cloudinit/config/cc_disk_setup.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cloudinit/config/cc_disk_setup.py b/cloudinit/config/cc_disk_setup.py index 74965899..d274f81a 100644 --- a/cloudinit/config/cc_disk_setup.py +++ b/cloudinit/config/cc_disk_setup.py @@ -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'] -- cgit v1.2.3