summaryrefslogtreecommitdiffstats
path: root/cobbler
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2007-02-12 14:55:52 -0500
committerJim Meyering <jim@meyering.net>2007-02-12 14:55:52 -0500
commitb6e92545918c47aee85bcce3351522229a3bf5f9 (patch)
tree5689f635b99da2f1bcacb8a2e5b7b759de1d9174 /cobbler
parent763d9812679ec3019662f0275972cf9761795a89 (diff)
downloadthird_party-cobbler-b6e92545918c47aee85bcce3351522229a3bf5f9.tar.gz
third_party-cobbler-b6e92545918c47aee85bcce3351522229a3bf5f9.tar.xz
third_party-cobbler-b6e92545918c47aee85bcce3351522229a3bf5f9.zip
Allow some variables to be None that really shouldn't ever be None, though for some reason they are None. Make sense? Good :)
Diffstat (limited to 'cobbler')
-rw-r--r--cobbler/action_sync.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/cobbler/action_sync.py b/cobbler/action_sync.py
index 1a41d30..c4766f5 100644
--- a/cobbler/action_sync.py
+++ b/cobbler/action_sync.py
@@ -781,14 +781,15 @@ class BootSync:
# for all list of kernel options
for items in list_of_opts:
# get each option
- tokens=items.split(" ")
- # deal with key/value pairs and single options alike
- for token in tokens:
- key_value = token.split("=")
- if len(key_value) == 1:
- internal[key_value[0]] = ""
- else:
- internal[key_value[0]] = key_value[1]
+ if items is not None:
+ tokens=items.split(" ")
+ # deal with key/value pairs and single options alike
+ for token in tokens:
+ key_value = token.split("=")
+ if len(key_value) == 1:
+ internal[key_value[0]] = ""
+ else:
+ internal[key_value[0]] = key_value[1]
if not is_for_kernel:
return internal
# the kernel requires a flat string for options, and we want