Skip to content

Commit e8aeb43

Browse files
committed
chore: linting issues in python collector
1 parent b066586 commit e8aeb43

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

Diff for: scripts/thunderstorm-collector.py

+8-6
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
import os
66
import re
77
import ssl
8-
import sys
98
import time
10-
import urllib.parse
119
import uuid
1210

1311
# Configuration
@@ -34,6 +32,11 @@
3432
num_submitted = 0
3533
num_processed = 0
3634

35+
# URL to use for submission
36+
api_endpoint = ""
37+
38+
# Original args
39+
args = {}
3740

3841
# Functions
3942
def process_dir(workdir):
@@ -155,6 +158,7 @@ def submit_sample(filepath):
155158
time.sleep(2 << retries)
156159
continue
157160

161+
# pylint: disable=no-else-continue
158162
if resp.status == 503: # Service unavailable
159163
retry_time = resp.headers.get("Retry-After", 30)
160164
time.sleep(retry_time)
@@ -204,13 +208,11 @@ def submit_sample(filepath):
204208
)
205209
parser.add_argument("--debug", action="store_true", help="Enable debug logging.")
206210

207-
global args
208211
args = parser.parse_args()
209212

210213
if args.tls:
211214
schema = "https"
212215

213-
global api_endpoint
214216
api_endpoint = "{}://{}:{}/api/checkAsync".format(schema, args.server, args.port)
215217

216218
print("=" * 80)
@@ -230,8 +232,8 @@ def submit_sample(filepath):
230232
print("Starting the walk at: {} ...".format(", ".join(args.dirs)))
231233

232234
# Walk directory
233-
for dir in args.dirs:
234-
process_dir(dir)
235+
for walkdir in args.dirs:
236+
process_dir(walkdir)
235237

236238
# End message
237239
end_date = time.time()

0 commit comments

Comments
 (0)