summaryrefslogtreecommitdiffstats
path: root/cobbler
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2007-02-20 13:29:21 -0500
committerJim Meyering <jim@meyering.net>2007-02-20 13:29:21 -0500
commitf04385c00c147889aa37e8937af420e9b49d34ea (patch)
tree660b3ba4239f1afb6cdcb730e1f85fba984354f6 /cobbler
parent3182a24a00b3d348beda172e0440566363e2df39 (diff)
downloadthird_party-cobbler-f04385c00c147889aa37e8937af420e9b49d34ea.tar.gz
third_party-cobbler-f04385c00c147889aa37e8937af420e9b49d34ea.tar.xz
third_party-cobbler-f04385c00c147889aa37e8937af420e9b49d34ea.zip
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.
Diffstat (limited to 'cobbler')
-rw-r--r--cobbler/yaml/dump.py16
1 files changed, 9 insertions, 7 deletions
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'):