diff options
author | harlowja <harlowja@virtualbox.rhel> | 2012-06-17 18:21:30 -0700 |
---|---|---|
committer | harlowja <harlowja@virtualbox.rhel> | 2012-06-17 18:21:30 -0700 |
commit | bc5322d2bc81b2421ae8dfe1bb02fa2fd61fed51 (patch) | |
tree | 820d08d35229aaa5b30bcdca4d12cd7c51171d85 /cloudinit | |
parent | 47f9f64a03c90ea08b6e363f786dfee921345682 (diff) | |
download | vyos-cloud-init-bc5322d2bc81b2421ae8dfe1bb02fa2fd61fed51.tar.gz vyos-cloud-init-bc5322d2bc81b2421ae8dfe1bb02fa2fd61fed51.zip |
Update the variable for comment positioning to be 'c_pos' (comment position) instead of 'hpos' (??)
Diffstat (limited to 'cloudinit')
-rw-r--r-- | cloudinit/distros/ubuntu.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cloudinit/distros/ubuntu.py b/cloudinit/distros/ubuntu.py index 786974ad..c0345c1d 100644 --- a/cloudinit/distros/ubuntu.py +++ b/cloudinit/distros/ubuntu.py @@ -83,10 +83,10 @@ class Distro(distros.Distro): def _read_hostname(self, filename, default=None): contents = util.load_file(filename, quiet=True) for line in contents.splitlines(): - hpos = line.find("#") + c_pos = line.find("#") # Handle inline comments - if hpos != -1: - line = line[0:hpos] + if c_pos != -1: + line = line[0:c_pos] line_c = line.strip() if line_c: return line_c |