diff options
author | Michael DeHaan <mdehaan@redhat.com> | 2007-02-20 13:29:21 -0500 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2007-02-20 13:29:21 -0500 |
commit | f04385c00c147889aa37e8937af420e9b49d34ea (patch) | |
tree | 660b3ba4239f1afb6cdcb730e1f85fba984354f6 | |
parent | 3182a24a00b3d348beda172e0440566363e2df39 (diff) | |
download | third_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.
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | cobbler/yaml/dump.py | 16 |
2 files changed, 10 insertions, 7 deletions
@@ -3,6 +3,7 @@ Cobbler CHANGELOG * Tue Feb 20 2007 - 0.4.3 - Added netboot_enabled option for systems to control install loops in programmatic context. +- Disabling anchors in YAML serialization (which make files harder to edit) - Ongoing ... * Mon Feb 19 2007 - 0.4.2 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'):
|