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:
parent
11968faffc
commit
704aaeecf9
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user