From 8a638337427aa41ce4ba51bb692c301ac9a42532 Mon Sep 17 00:00:00 2001 From: Finn Date: Sun, 13 Mar 2016 10:09:03 -0700 Subject: [PATCH] Make whatever crazy python linter I installed happy --- tests.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests.py b/tests.py index 3e10342..b501e5e 100755 --- a/tests.py +++ b/tests.py @@ -1,4 +1,5 @@ #!/usr/bin/env python3 +"""Checks that the peering details in this repo conform to a few basic rules.""" import json import os import sys @@ -13,6 +14,7 @@ END = '\x1b[0m' def validate(path): + """Test a single set of peering creds.""" print("Validating %s" % path) try: creds = open(path).read() @@ -21,12 +23,12 @@ def validate(path): warning = False for host in hosts: for field in REQUIRED_FIELDS: - if not field in peers[host]: + if field not in peers[host]: print(" %sHost %s is missing the required field %s%s" % (RED, host, field, END)) return False for field in RECOMMENDED_FIELDS: - if not field in peers[host]: + if field not in peers[host]: warning = True print(" %sHost %s is missing the recommended field %s%s" % (YELLOW, host, field, END))