(resultPath: str, messageId: str, marker: str)
| 705 | |
| 706 | |
| 707 | def messageIdTodayReport(resultPath: str, messageId: str, marker: str) -> str: |
| 708 | text = messageId + '\n' |
| 709 | e = '[' + messageId + ']\n' |
| 710 | today = strDateTime()[:10] |
| 711 | for filename in sorted(glob.glob(resultPath + '/*')): |
| 712 | if not os.path.isfile(filename) or filename.endswith('.diff'): |
| 713 | continue |
| 714 | url = None |
| 715 | inResults = False |
| 716 | firstLine = True |
| 717 | for line in open(filename, 'rt'): |
| 718 | if firstLine: |
| 719 | firstLine = False |
| 720 | if not line.startswith(today): |
| 721 | break |
| 722 | if line.startswith('ftp://'): |
| 723 | url = line |
| 724 | continue |
| 725 | if not inResults: |
| 726 | if line.startswith(marker): |
| 727 | inResults = True |
| 728 | continue |
| 729 | if line.startswith('diff:'): |
| 730 | break |
| 731 | if line.endswith(e): |
| 732 | if url: |
| 733 | text += url |
| 734 | url = None |
| 735 | text += line |
| 736 | return text |
| 737 | |
| 738 | |
| 739 | def headMessageIdTodayReport(resultPath: str, messageId: str) -> str: |
no test coverage detected