Skip to content

Commit

Permalink
use listify help function in exactwordanalyzer constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
colincrawford committed Oct 1, 2020
1 parent 08ebdbc commit b060790
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions pastepwn/analyzers/exactwordanalyzer.py
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
import re
from .basicanalyzer import BasicAnalyzer
from ..util import listify


class ExactWordAnalyzer(BasicAnalyzer):
Expand All @@ -10,13 +11,7 @@ class ExactWordAnalyzer(BasicAnalyzer):
def __init__(self, actions, words, blacklist=None, case_sensitive=False):
super().__init__(actions, "{0} ({1})".format(self.name, words))

if words is None:
self.words = []
elif isinstance(words, list):
self.words = words
else:
self.words = [words]

self.words = listify(words)
self.blacklist = blacklist or []
self.case_sensitive = case_sensitive

Expand Down

0 comments on commit b060790

Please sign in to comment.