1 |
|
#!/usr/bin/env python |
2 |
|
|
3 |
< |
import sys |
3 |
> |
import sys , re #DS |
4 |
> |
EXIT_CODE_RE = re.compile('^\s*-\s*[Ee]xit.[Cc]ode\s*=\s*(.*?)\s*$') |
5 |
|
|
6 |
|
class EdgLoggingInfo: |
7 |
|
def __init__(self) : |
74 |
|
final_done = 1 |
75 |
|
if line.count('reason') >= 1 : |
76 |
|
reason = self.parse_reason(line.split('=')[1].strip()) |
77 |
< |
if line.count('exit_code') >= 1 : |
78 |
< |
exit_code = line.split('=')[1].strip() |
77 |
> |
match = EXIT_CODE_RE.match(line) #DS |
78 |
> |
if match: #DS |
79 |
> |
exit_code = match.groups()[0] #DS |
80 |
> |
#if line.count('exit_code') >= 1 : |
81 |
> |
# exit_code = line.split('=')[1].strip() |
82 |
|
# if line.count('time') >= 1 : |
83 |
|
# time = line.split('=')[1].strip() |
84 |
|
|