Skip to content

Commit

Permalink
Merge pull request #36 from kbase/develop
Browse files Browse the repository at this point in the history
Fixing another bug in the code
  • Loading branch information
jkbaumohl authored Oct 21, 2021
2 parents 283ad17 + 9f60e45 commit 552fad8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions source/error_categories_EE2.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ def add_category(error_dict):
Otherwise, if no mapping is found, the app method name is given as the error category"""
# Pull app log and get error -> categories dictionary
if isinstance(error_dict['error'], str):
error_values_all = error_dict['error'] + error_dict['traceback']
error_values_all = error_dict['error'] + str(error_dict['traceback'])
else:
error_values_all = error_dict['traceback']
error_values_all = str(error_dict['traceback'])
# Categories is a helper function that takes the category listing the Error.ini and returns a dict from key to category
categories = config_to_dictionary()
for category, error_array in categories.items():
Expand Down
5 changes: 4 additions & 1 deletion source/filter_noquote_tuple.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ def filter_tuple(error_dictionary, error, regex_pat, sub_sym):
err_prefix = re.sub(sub_sym, '', prefix).replace("(", ' ').replace("[", '').replace("]", '').strip()
# Update error dictionary for error and append to logs
# Once the error and error_prefix is in the dictionary, the dictionary is sent to add_category for a category to be added.
error_dictionary["error"] = error
if error:
error_dictionary["error"] = error
else:
error_dictionary["error"] = "No Error Found"
error_dictionary["err_prefix"] = err_prefix
category = add_category(error_dictionary)
error_dictionary["category"] = category
Expand Down

0 comments on commit 552fad8

Please sign in to comment.