From 86dc35022a6eadddccfa32007d5cae9bfc3d10ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Fri, 30 Jul 2021 08:19:59 +0200 Subject: [PATCH] generate_msg_docs.py: simplify logic a bit --- msg/tools/generate_msg_docs.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/msg/tools/generate_msg_docs.py b/msg/tools/generate_msg_docs.py index ca97718091..9b8f4c7051 100755 --- a/msg/tools/generate_msg_docs.py +++ b/msg/tools/generate_msg_docs.py @@ -43,11 +43,10 @@ if __name__ == "__main__": msg_description = "" #Get msg description (first non-empty comment line from top of msg) with open(msg_filename, 'r') as lineparser: - line = lineparser.readline() + line = lineparser.readline().strip() while line.startswith('#'): #print('DEBUG: line: %s' % line) - line=line.strip('# ') - line=line.rstrip('\n') + line=line[1:].strip() if line: msg_description=line print('msg_description: Z%sZ' % msg_description)