File tree 1 file changed +8
-6
lines changed
1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 5
5
import os
6
6
import re
7
7
import ssl
8
- import sys
9
8
import time
10
- import urllib .parse
11
9
import uuid
12
10
13
11
# Configuration
34
32
num_submitted = 0
35
33
num_processed = 0
36
34
35
+ # URL to use for submission
36
+ api_endpoint = ""
37
+
38
+ # Original args
39
+ args = {}
37
40
38
41
# Functions
39
42
def process_dir (workdir ):
@@ -155,6 +158,7 @@ def submit_sample(filepath):
155
158
time .sleep (2 << retries )
156
159
continue
157
160
161
+ # pylint: disable=no-else-continue
158
162
if resp .status == 503 : # Service unavailable
159
163
retry_time = resp .headers .get ("Retry-After" , 30 )
160
164
time .sleep (retry_time )
@@ -204,13 +208,11 @@ def submit_sample(filepath):
204
208
)
205
209
parser .add_argument ("--debug" , action = "store_true" , help = "Enable debug logging." )
206
210
207
- global args
208
211
args = parser .parse_args ()
209
212
210
213
if args .tls :
211
214
schema = "https"
212
215
213
- global api_endpoint
214
216
api_endpoint = "{}://{}:{}/api/checkAsync" .format (schema , args .server , args .port )
215
217
216
218
print ("=" * 80 )
@@ -230,8 +232,8 @@ def submit_sample(filepath):
230
232
print ("Starting the walk at: {} ..." .format (", " .join (args .dirs )))
231
233
232
234
# Walk directory
233
- for dir in args .dirs :
234
- process_dir (dir )
235
+ for walkdir in args .dirs :
236
+ process_dir (walkdir )
235
237
236
238
# End message
237
239
end_date = time .time ()
You can’t perform that action at this time.
0 commit comments