From 201b4bf14aea5df753202bdb0e3df3a60f023323 Mon Sep 17 00:00:00 2001 From: opi Date: Wed, 1 Jun 2016 09:44:20 +0200 Subject: [PATCH] [fix] Wording. --- package_linter.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package_linter.py b/package_linter.py index a07a169..807b459 100755 --- a/package_linter.py +++ b/package_linter.py @@ -56,11 +56,11 @@ def check_manifest(manifest): with open(manifest, encoding='utf-8') as data_file: manifest = json.loads(data_file.read()) print_right("Manifest syntax is good.") - except: print_wrong("There is a syntax (comma) issue in manifest.json. Can't check manifest."); return + except: print_wrong("Syntax (comma) or encoding issue with manifest.json. Can't check file."); return i, fields = 0, ("name", "id", "packaging_format", "description", "url", \ "license", "maintainer", "multi_instance", "services", "arguments") # "requirements" while (i < len(fields)): - if fields[i] in manifest: print_right("\"" + fields[i] + "\" fields is present") + if fields[i] in manifest: print_right("\"" + fields[i] + "\" field is present") else: print_wrong("\"" + fields[i] + "\" field is missing") i+=1 """ @@ -82,7 +82,7 @@ def check_manifest(manifest): elif "license" in manifest: print_right("\"licence\" key value is good") if "multi_instance" in manifest and manifest["multi_instance"] != 1 and manifest["multi_instance"] != 0: print_wrong("\"multi_instance\" field must be boolean type values 'true' or 'false' and not string type") - elif "multi_instance" in manifest: print_right("\"multi_isntance\" field is good") + elif "multi_instance" in manifest: print_right("\"multi_instance\" field is good") if "services" in manifest: services = ("nginx", "php5-fpm", "mysql", "uwsgi", "metronome", "postfix", "dovecot") #, "rspamd", "rmilter") i = 0 @@ -115,8 +115,8 @@ def check_script(path, script_name): print("You should not fetch sources from internet with curl or wget for security reasons.") def check_script_header_presence(script): - if "#!/bin/bash" in script[0]: print_right("Script contain at first line \"#!/bin/bash\"") - else: print_wrong("Script must contain at first line \"#!/bin/bash\"") + if "#!/bin/bash" in script[0]: print_right("Script starts with \"#!/bin/bash\"") + else: print_wrong("Script must start with \"#!/bin/bash\"") def check_sudo_prefix_commands(script): """