summaryrefslogtreecommitdiff
path: root/cloudinit/distros
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit/distros')
-rw-r--r--cloudinit/distros/ubuntu.py6
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