diff options
author | Michael DeHaan <mdehaan@redhat.com> | 2007-08-23 12:12:42 -0400 |
---|---|---|
committer | Michael DeHaan <mdehaan@redhat.com> | 2007-08-23 12:12:42 -0400 |
commit | 068fe0df24740772c1a588ec62d5673383a8e880 (patch) | |
tree | dcf1f61e759797bd2b9446d8547e48eb7d26b036 /cobbler/item_system.py | |
parent | 538fc78ee8cb5cff2bc8bce7fb531b46ad305ae1 (diff) | |
download | third_party-cobbler-068fe0df24740772c1a588ec62d5673383a8e880.tar.gz third_party-cobbler-068fe0df24740772c1a588ec62d5673383a8e880.tar.xz third_party-cobbler-068fe0df24740772c1a588ec62d5673383a8e880.zip |
Some code to fix a reference issue that allowed for hash value propogation up the graph, in ksmeta and
possibly kopts. Also added some code to check to make sure an object of the wrong type never gets
added to the wrong collection.
Diffstat (limited to 'cobbler/item_system.py')
-rw-r--r-- | cobbler/item_system.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cobbler/item_system.py b/cobbler/item_system.py index 3575d79..445cf73 100644 --- a/cobbler/item_system.py +++ b/cobbler/item_system.py @@ -21,6 +21,7 @@ from rhpl.translate import _, N_, textdomain, utf8 class System(item.Item): TYPE_NAME = _("system") + COLLECTION_TYPE = "system" def make_clone(self): ds = self.to_datastruct() @@ -70,9 +71,9 @@ class System(item.Item): # backwards compatibility -- convert string entries to dicts for storage # this allows for better usage from the API. - if type(self.kernel_options) != dict: + if self.kernel_options != "<<inherit>>" and type(self.kernel_options) != dict: self.set_kernel_options(self.kernel_options) - if type(self.ks_meta) != dict: + if self.ks_meta != "<<inherit>>" and type(self.ks_meta) != dict: self.set_ksmeta(self.ks_meta) # backwards compatibility -- if name is an IP or a MAC, set appropriate fields |