diff --git a/avred.py b/avred.py index f40c304..6200e22 100755 --- a/avred.py +++ b/avred.py @@ -166,7 +166,7 @@ def scanFile(args, scanner): # convert IntervalTree Matches logging.info("Found {} matches".format(len(matchesIt))) if len(matchesIt) == 0: - logging.warn("No matches found. Try some other options?") + logging.warning("No matches found. Try some other options?") matches = convertMatchesIt(matchesIt) verification = None diff --git a/verifier.py b/verifier.py index 282a79a..98ab550 100644 --- a/verifier.py +++ b/verifier.py @@ -35,6 +35,9 @@ def verify(file, matches: List[Match], scanner) -> Verification: def verificationAnalyzer(verifications: List[VerificationEntry]) -> MatchConclusion: """Do some analysis on the verifications, and return the result""" verifyResults = [] + if len(verifications) == 0: + matchConclusions = MatchConclusion(verifyResults) + return matchConclusions matchCount = len(verifications[0].matchTests) @@ -111,6 +114,9 @@ def runVerifications(file, matches: List[Match], scanner) -> List[VerificationEn verificationRun.matchTests.append(toTestEntry('', result)) verificationRuns.append(verificationRun) + if len(matches) == 1: + return verificationRuns + # Incremental, Middle verificationRun = VerificationEntry( index=2,