Changeset 561:e24cf77618c9
- Timestamp:
- 06/01/08 20:58:12 (7 months ago)
- Author:
- David Anderson <dave@…>
- Branch:
- default
- Message:
-
Make copyright_report.py smarter about extracting filepaths.
It now no longer chokes on deletions (filepath /dev/null) and
diffs contained within the diff (more than 3 '+' at the start
of a line).
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r559
|
r561
|
|
| 81 | 81 | |
| 82 | 82 | for line in sys.stdin: |
| 83 | | if line.startswith('+++'): |
| 84 | | filepath = line.split()[1][2:] |
| | 83 | if line.startswith('+++ '): |
| | 84 | filepath = line.split()[1] |
| | 85 | |
| | 86 | # Skip deletions |
| | 87 | if filepath == '/dev/null': |
| | 88 | continue |
| | 89 | |
| | 90 | if filepath[:2] in ('a/', 'b/'): |
| | 91 | filepath = filepath[2:] |
| | 92 | |
| 85 | 93 | if not check_file(filepath): |
| 86 | 94 | ok = False |