]> code.ossystems Code Review - openembedded-core.git/commitdiff
send-error-report: Fix test for name > 50 chars
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 4 Jul 2018 09:40:46 +0000 (10:40 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 4 Jul 2018 11:19:06 +0000 (12:19 +0100)
A name > 50 chars causes a 500 internal server error and should be warned
to the user but the code to do so currently doesn't work. Fix the logic.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/send-error-report

index 02014ba9d853896eec4b8c418bc6b9e8942c313c..8939f5f594a7ec381f232f7b9821407099feac81 100755 (executable)
@@ -88,7 +88,7 @@ def prepare_data(args):
         log.error("Name needs to be provided either via "+userfile+" or as an argument (-n).")
         sys.exit(1)
 
-    while len(args.name) <= 0 and len(args.name) < 50:
+    while len(args.name) <= 0 or len(args.name) > 50:
         print("\nName needs to be given and must not more than 50 characters.")
         args.name, args.email = ask_for_contactdetails()