linting
This commit is contained in:
parent
fefbaeb143
commit
fad64ff064
|
@ -74,7 +74,7 @@ class SpamAssassin(object):
|
||||||
|
|
||||||
first_line = match.group(1)
|
first_line = match.group(1)
|
||||||
headers = match.group(2)
|
headers = match.group(2)
|
||||||
body = response[match.end(0) :]
|
body = response[match.end(0):]
|
||||||
|
|
||||||
# Checking response is good
|
# Checking response is good
|
||||||
match = first_line_pattern.match(first_line)
|
match = first_line_pattern.match(first_line)
|
||||||
|
@ -87,7 +87,7 @@ class SpamAssassin(object):
|
||||||
s.strip() for s in body.decode("utf-8", errors="ignore").strip().split("\n")
|
s.strip() for s in body.decode("utf-8", errors="ignore").strip().split("\n")
|
||||||
]
|
]
|
||||||
linebreak_num = report_list.index([s for s in report_list if "---" in s][0])
|
linebreak_num = report_list.index([s for s in report_list if "---" in s][0])
|
||||||
tablelists = [s for s in report_list[linebreak_num + 1 :]]
|
tablelists = [s for s in report_list[linebreak_num + 1:]]
|
||||||
|
|
||||||
self.report_fulltext = "\n".join(report_list)
|
self.report_fulltext = "\n".join(report_list)
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ class SpamAssassin(object):
|
||||||
# create final json
|
# create final json
|
||||||
self.report_json = dict()
|
self.report_json = dict()
|
||||||
for tablelist in tablelists:
|
for tablelist in tablelists:
|
||||||
wordlist = re.split("\s+", tablelist)
|
wordlist = re.split(r"\s+", tablelist)
|
||||||
try:
|
try:
|
||||||
self.report_json[wordlist[1]] = {
|
self.report_json[wordlist[1]] = {
|
||||||
"partscore": float(wordlist[0]),
|
"partscore": float(wordlist[0]),
|
||||||
|
|
Loading…
Reference in New Issue