2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-01-09 04:56:12 +00:00

Tolerate newline in myname

vim is quite insistent on adding a newline, tolerate that.
This commit is contained in:
Jarrod Johnson 2018-07-11 09:36:51 -04:00
parent 11968faffc
commit 704aaeecf9

View File

@ -147,7 +147,7 @@ def connect_to_collective(cert, member):
def get_myname():
try:
with open('/etc/confluent/cfg/myname', 'r') as f:
return f.read()
return f.read().strip()
except IOError:
myname = socket.gethostname()
with open('/etc/confluent/cfg/myname', 'w') as f: