Skip to content

Commit 54136e1

Browse files
timopollmeiergreenbonebot
authored andcommitted
Format monthly-report script, remove unused import
1 parent d505ca6 commit 54136e1

1 file changed

Lines changed: 13 additions & 6 deletions

File tree

scripts/monthly-report-gos24.10.gmp.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#
33
# SPDX-License-Identifier: GPL-3.0-or-later
44

5-
import sys
65
from argparse import ArgumentParser, Namespace, RawDescriptionHelpFormatter
76
from datetime import date, datetime, timedelta
87

@@ -109,21 +108,29 @@ def print_reports(
109108
mod_date = datetime.fromisoformat(
110109
identifier.findtext("modification_time")
111110
).date()
112-
111+
113112
if mod_date >= to_date or mod_date < from_date:
114113
continue
115-
114+
116115
report_ids.append(identifier.find("source").get("id"))
117-
if reports_choice == 'last':
116+
if reports_choice == "last":
118117
break
119118

120-
if reports_choice == 'last':
119+
if reports_choice == "last":
121120
table_data.append(
122121
[hostname, ip, report_ids[0], critical, high, medium, low]
123122
)
124123
else:
125124
table_data.append(
126-
[hostname, ip, ',\n'.join(report_ids)+'\n', critical, high, medium, low]
125+
[
126+
hostname,
127+
ip,
128+
",\n".join(report_ids) + "\n",
129+
critical,
130+
high,
131+
medium,
132+
low,
133+
]
127134
)
128135

129136
table = AsciiTable(table_data)

0 commit comments

Comments
 (0)