Skip to content

Commit

Permalink
Update test_error_classification.py
Browse files Browse the repository at this point in the history
Added a system exit if the database does not have the code
  • Loading branch information
JammelBrooks authored Nov 12, 2024
1 parent dfd6a36 commit 21081db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pandaserver/test/test_error_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ def find_error_source (jobId):
#If there are zero matches then the code will exit here
print("Error source does not exist")
sys.exit(1)

return None, None, None

#Step2: We need to check if the error source is in the error classification database table and classify the error
Expand All @@ -76,7 +75,8 @@ def classify_error(err_source, err_code, err_diag):
_logger.info(f"Classified error ({err_source}, {err_code}, {err_diag})")
return rule_class
_logger.info(f"Error ({err_source}, {err_code}, {err_diag}) classified as Unknown")
return rule_class # Default if no match found
sys.exit()
return None # Default if no match found



Expand Down

0 comments on commit 21081db

Please sign in to comment.