@@ -347,8 +347,6 @@ def main():
347347
348348 throttler = Throttler ()
349349
350- return_code = True
351-
352350 for testcase_id in data_handler .get_open_testcase_id_iterator ():
353351 logs .info (f'Triaging { testcase_id } ' )
354352 try :
@@ -430,31 +428,19 @@ def main():
430428 issue_filer .notify_issue_update (testcase , 'new' )
431429 continue
432430
433- try :
434- # If there are similar issues to this test case already filed or recently
435- # closed, skip filing a duplicate bug.
436- if _check_and_update_similar_bug (testcase , issue_tracker ):
437- logs .info (f'Skipping testcase { testcase_id } , since a similar bug'
438- ' was already filed.' )
439- continue
440- except Exception as e :
441- logs .error (f'Failed to check testcase { testcase .id .key ()} '
442- f' for similar bugs: { e } ' )
443- return_code = False
431+ # If there are similar issues to this test case already filed or recently
432+ # closed, skip filing a duplicate bug.
433+ if _check_and_update_similar_bug (testcase , issue_tracker ):
434+ logs .info (f'Skipping testcase { testcase_id } , since a similar bug'
435+ ' was already filed.' )
444436 continue
445437
446438 # Clean up old triage messages that would be not applicable now.
447439 testcase .delete_metadata (TRIAGE_MESSAGE_KEY , update_testcase = False )
448440
449- try :
450- # # File the bug first and then create filed bug metadata.
451- if not _file_issue (testcase , issue_tracker , throttler ):
452- logs .info (f'Issue filing failed for testcase id { testcase_id } ' )
453- continue
454- except Exception as e :
455- logs .error ('Failed to file issue for testcase '
456- f'{ testcase .id .key ()} : { e } ' )
457- return_code = False
441+ # # File the bug first and then create filed bug metadata.
442+ if not _file_issue (testcase , issue_tracker , throttler ):
443+ logs .info (f'Issue filing failed for testcase id { testcase_id } ' )
458444 continue
459445
460446 _create_filed_bug_metadata (testcase )
@@ -463,12 +449,8 @@ def main():
463449 logs .info ('Filed new issue %s for testcase %d.' % (testcase .bug_information ,
464450 testcase_id ))
465451
466- if return_code :
467- logs .info ('Triage testcases succeeded.' )
468- else :
469- logs .error ('Triage testcases failed.' )
470-
471- return return_code
452+ logs .info ('Triage testcases succeeded.' )
453+ return True
472454
473455
474456class Throttler :
0 commit comments