From abb3f1f3517d654050cfeb2161347163bc63455b Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Mon, 5 Dec 2016 14:12:39 -0500 Subject: made sure beautify is called only if -b is specified --- www/lang/checklang.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/lang/checklang.py b/www/lang/checklang.py index 3ae37fa5..307f51df 100755 --- a/www/lang/checklang.py +++ b/www/lang/checklang.py @@ -15,6 +15,7 @@ globFile="" def usage(): print(( 'Usage: '+sys.argv[0]+'\n' + ' called without arguments runs a check without any modifications\n' ' -h|--help: this help\n' ' -f|file : only processes that file\n' ' -b|--beautify: beautifies the json file\n' @@ -62,7 +63,7 @@ def compare(fname): if len(diffOrig)==0 and len (diffNew)==0: status = "GOOD" globGood+=1 - if globBeautify and globFile == fname or globFile == "": + if globBeautify and (globFile == fname or globFile == ""): beaut="YES" else: status = "ERROR" -- cgit v1.2.3