From f04385c00c147889aa37e8937af420e9b49d34ea Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Tue, 20 Feb 2007 13:29:21 -0500 Subject: Disabling of anchors in YAML serialization, which makes configuration files much easier to read/edit/understand once disabled. Anchors are basically pointers to pieces of text strings that prevent them from being repeated, but in cobbler, they really don't add any value. For users with configuration files that are still using anchors (&1, *1, etc), running "cobbler reserialize" can remove them once upgraded to this version -- though that is not neccessary. --- cobbler/yaml/dump.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'cobbler') diff --git a/cobbler/yaml/dump.py b/cobbler/yaml/dump.py index c55dbfe..b8e9d79 100644 --- a/cobbler/yaml/dump.py +++ b/cobbler/yaml/dump.py @@ -69,13 +69,15 @@ class Dumper: def dumpData(self, data): anchor = self.anchors.shouldAnchor(data) - if anchor: - self.output(" &%d" % anchor ) - else: - anchor = self.anchors.isAlias(data) - if anchor: - self.output(" *%d" % anchor ) - return + # Disabling anchors because they are lame for strings that the user might want to view/edit -- mdehaan + # + #if anchor: + # self.output(" &%d" % anchor ) + #else: + # anchor = self.anchors.isAlias(data) + # if anchor: + # self.output(" *%d" % anchor ) + # return if (data is None): self.output(' ~') elif hasMethod(data, 'to_yaml'): -- cgit