@@ -34,7 +34,7 @@ def fetch_dojo_product_name(defect_dojo, defect_dojo_user, defect_dojo_key, prod
34
34
defect_dojo , defect_dojo_key , defect_dojo_user , debug = False , timeout = 120 )
35
35
max_retries = int (getenv ("MAX_RETRIES" , '6' ))
36
36
retry_delay = 30
37
- for attempt in range (max_retries ):
37
+ for _ in range (max_retries ):
38
38
try :
39
39
product = dojo .get_product (product_id = product_id )
40
40
return product .data ["name" ]
@@ -106,7 +106,7 @@ def defectdojo_upload(product_id: int, zap_filename: str, defect_dojo_key: str,
106
106
date = datetime .today ().strftime ("%Y%m%d%H:%M" )
107
107
lead_id = fetch_dojo_lead_id (dojo , defect_dojo_user )
108
108
109
- # The call to create_engagement sometimes fails.
109
+ # The call to create_engagement sometimes fails.
110
110
retry_delay = 20
111
111
max_retries = int (getenv ("MAX_RETRIES" , '5' ))
112
112
for attempt in range (max_retries ):
@@ -252,7 +252,6 @@ def get_codedx_initial_report(
252
252
file_name = report_file ,
253
253
filters = filters ,
254
254
)
255
-
256
255
return report_file
257
256
258
257
@@ -382,7 +381,7 @@ def upload_googledrive(scan_type, zap_filename, codedx_project, report_file, sla
382
381
"""
383
382
root_id = os .getenv ('DRIVE_ROOT_ID' , None )
384
383
drive_id = os .getenv ('DRIVE_ID' , None )
385
- if scan_type in (ScanType .BASELINE ):
384
+ if scan_type in (ScanType .BASELINE ):
386
385
return
387
386
try :
388
387
logging .info ('Setting up the google drive API service for uploading reports.' )
@@ -399,7 +398,6 @@ def upload_googledrive(scan_type, zap_filename, codedx_project, report_file, sla
399
398
date = datetime .today ()
400
399
date = drivehelper .adjust_date (date )
401
400
_ , xml_folder_dict , zap_raw_folder = drivehelper .get_upload_folders (folder_structure , date )
402
-
403
401
file = drivehelper .upload_file_to_drive (zap_filename ,
404
402
xml_folder_dict .get ('id' ),
405
403
drive_id ,
@@ -520,7 +518,7 @@ def main(): # pylint: disable=too-many-locals
520
518
)
521
519
zap_shutdown ()
522
520
return
523
-
521
+
524
522
# upload its results to Code Dx
525
523
cdx = CodeDx (codedx_url , codedx_api_key )
526
524
0 commit comments