695 |
if error: |
if error: |
696 |
# XXX - ugly |
# XXX - ugly |
697 |
contents.seek(0) |
contents.seek(0) |
698 |
lastline = contents.read().splitlines()[-1] |
lastline = contents.read().rstrip().splitlines()[-1] |
699 |
# Remove things like "ERROR: " and so on from the last line |
# Remove things like "ERROR: " and so on from the last line |
700 |
lastline = re.sub(r'^(?:[^ :]+:\s+)+', '', lastline) |
lastline = re.sub(r'^(?:[^ :]+:\s+)+', '', lastline) |
701 |
subjecterror = " (ERROR: %s)" % lastline if lastline else " (ERROR)" |
subjecterror = " (ERROR: %s)" % lastline if lastline else " (ERROR)" |
850 |
sys.exit(0) |
sys.exit(0) |
851 |
|
|
852 |
if __name__ == "__main__": |
if __name__ == "__main__": |
853 |
|
os.environ['PYTHONUNBUFFERED'] = '1' |
854 |
main() |
main() |