summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2013-09-27 17:08:40 -0400
committerScott Moser <smoser@ubuntu.com>2013-09-27 17:08:40 -0400
commit2cb3d6f52c9d1ee803f151c1aacda355974fb083 (patch)
treeb4de895a137d0185b6e5d4ec1458a83da55f2b94
parent327c023bffc4ab2e30bb9839d0062159be848147 (diff)
downloadvyos-cloud-init-2cb3d6f52c9d1ee803f151c1aacda355974fb083.tar.gz
vyos-cloud-init-2cb3d6f52c9d1ee803f151c1aacda355974fb083.zip
find_device_node: treat label=None as label=""
Since for a string there is no difference, we're just checking for this here.
-rw-r--r--cloudinit/config/cc_disk_setup.py4
1 files changed, 4 insertions, 0 deletions
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']