From bc5322d2bc81b2421ae8dfe1bb02fa2fd61fed51 Mon Sep 17 00:00:00 2001 From: harlowja Date: Sun, 17 Jun 2012 18:21:30 -0700 Subject: Update the variable for comment positioning to be 'c_pos' (comment position) instead of 'hpos' (??) --- cloudinit/distros/ubuntu.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cloudinit/distros') 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 -- cgit v1.2.3