diff options
author | Matt Wilson <msw@redhat.com> | 2000-06-30 20:55:04 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 2000-06-30 20:55:04 +0000 |
commit | 3cedf001d201f6e0ba11c6950804c35618fe0d39 (patch) | |
tree | fef5d9cd144eb6c1bdcd19ebac43ac12fd454cd8 | |
parent | 7c34135f03bdb1c24e8d05315fdbab053c7a764f (diff) | |
download | anaconda-3cedf001d201f6e0ba11c6950804c35618fe0d39.tar.gz anaconda-3cedf001d201f6e0ba11c6950804c35618fe0d39.tar.xz anaconda-3cedf001d201f6e0ba11c6950804c35618fe0d39.zip |
patch to avoid adding extra whitespace to lilo.conf on upgrades from hj
-rw-r--r-- | lilo.py | 17 |
1 files changed, 10 insertions, 7 deletions
@@ -81,20 +81,23 @@ class LiloConfigFile: orig = l while (l and (l[0] == ' ' or l[0] == '\t')): l = l[1:] - if (not l or l[0] == '#'): - self.order.append('#' + orig) + if not l: continue + if l[0] == '#': + self.order.append('#' + orig) fields = string.split(l, '=', 1) if (len(fields) == 2): - if (fields[0] == "image" or fields[0] == "other"): + f0 = string.strip (fields [0]) + f1 = string.strip (fields [1]) + if (f0 == "image" or f0 == "other"): if image: self.addImage(image) - image = LiloConfigFile(imageType = fields[0], - path = fields[1]) + image = LiloConfigFile(imageType = f0, + path = f1) args = None else: - args = (fields[0], fields[1]) + args = (f0, f1) else: - args = (l,) + args = (string.strip (l),) if (args and image): apply(image.addEntry, args) |