Ensure we throw an appropriate error if there's no patterns available.

This commit is contained in:
Mike Auty
2017-07-16 22:52:56 +01:00
parent b68932a7bc
commit 807b5dcaf0
@@ -23,6 +23,9 @@ class WuManber(object):
def preprocess(self):
"""Preprocesses the patterns by populating the three arrays"""
if not self._patterns:
raise ValueError("No Linux symbols/banner patterns available")
# Set the minimun pattern length
self.minimum_pattern_length = min([len(pattern) for pattern in self._patterns])