Skip to content

Commit

Permalink
Added methods
Browse files Browse the repository at this point in the history
  • Loading branch information
chwerth committed Mar 23, 2019
1 parent df6fff2 commit fe598dd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions error_parsing/Error_Parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,13 @@ class parser:
def get_last_line(full_error):
all_lines = full_error.splitlines()
return all_lines[-1]

def get_last_line_as_array(full_error):
return ((full_error.splitlines())[-1]).split()

def get_error_type(full_error):
all_lines = full_error.splitlines()
last_line = all_lines[-1]
words = last_line.split()
first_word = words[0]
return first_word[:-1]

0 comments on commit fe598dd

Please sign in to comment.