ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CRAB/python/EdgLoggingInfo.py
(Generate patch)

Comparing COMP/CRAB/python/EdgLoggingInfo.py (file contents):
Revision 1.4 by slacapra, Thu Apr 19 13:49:09 2007 UTC vs.
Revision 1.5 by mcinquil, Tue Sep 25 08:28:17 2007 UTC

# Line 1 | Line 1
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) :
# Line 73 | Line 74 | class EdgLoggingInfo:
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              

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines