Commit 6edc61ba authored by Marco Mariani's avatar Marco Mariani

Fixed a bug where the hostname would contain a newline

parent d3f1deb4
Changes Changes
======= =======
1.0.7 (unreleased)
------------------
* Fixed a bug where the hostname would contain a newline.
1.0a6 (2013-01-15) 1.0a6 (2013-01-15)
------------------ ------------------
......
...@@ -136,8 +136,9 @@ def get_computer_name(slapos_configuration): ...@@ -136,8 +136,9 @@ def get_computer_name(slapos_configuration):
try: try:
conf_file=open(slapos_configuration, "r") conf_file=open(slapos_configuration, "r")
for line in conf_file: for line in conf_file:
line = line.rstrip('\n')
if "computer_id" in line: if "computer_id" in line:
i=line.find("COMP-") i = line.find("COMP-")
conf_file.close() conf_file.close()
return line[i:] return line[i:]
except IOError: except IOError:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment