mirror of
https://github.com/markqvist/Reticulum.git
synced 2026-10-26 02:48:57 -04:00
Strip trailing whitespace from templates
This commit is contained in:
parent
c8235544e8
commit
4733d6d75a
1 changed files with 2 additions and 2 deletions
|
|
@ -193,7 +193,7 @@ class NomadNetworkNode():
|
|||
if os.access(path, os.X_OK):
|
||||
try:
|
||||
result = subprocess.run([path], stdout=subprocess.PIPE)
|
||||
template = result.stdout.decode("utf-8")
|
||||
template = result.stdout.decode("utf-8").rstrip()
|
||||
return template
|
||||
|
||||
except Exception as e:
|
||||
|
|
@ -202,7 +202,7 @@ class NomadNetworkNode():
|
|||
|
||||
else:
|
||||
try:
|
||||
with open(path, "rb") as fh: return fh.read().decode("utf-8")
|
||||
with open(path, "rb") as fh: return fh.read().decode("utf-8").rstrip()
|
||||
|
||||
except Exception as e:
|
||||
RNS.log(f"Could not get static template content from {path}: {e}", RNS.LOG_ERROR)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue