location.in: strip trailing whitespaces in database description while dumping

Message ID f05d57a0-4a9f-8d46-68fc-1aefeff5e4ea@ipfire.org
State Accepted
Commit cfbae90fba1a1d8e46b135be10ee52af1c840683
Headers
Series location.in: strip trailing whitespaces in database description while dumping |

Commit Message

Peter Müller June 22, 2020, 5:55 p.m. UTC
  Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
---
 src/python/location.in | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Patch

diff --git a/src/python/location.in b/src/python/location.in
index d37294d..a804804 100644
--- a/src/python/location.in
+++ b/src/python/location.in
@@ -321,7 +321,8 @@  class CLI(object):
 
 		if db.description:
 			for line in db.description.splitlines():
-				f.write("# %s\n" % line)
+				line = "# %s" % line
+				f.write("%s\n" % line.rstrip())
 
 			f.write("#\n")