1 |
On 10/19/2011 12:55 PM, Fabian Groffen wrote: |
2 |
> +def update_copyrights(pkgdir, files, year, pretend): |
3 |
|
4 |
I think update_copyrights() could just as well operate on a single file, |
5 |
and take a single file argument in place of the pkgdir and files |
6 |
arguments. That would simplify the interface a tiny bit. |
7 |
|
8 |
> @@ -651,7 +733,7 @@ |
9 |
> if clold_file is not None: |
10 |
> # clold_lines may contain a saved non-header line |
11 |
> # that we want to write first. |
12 |
> - if clold_lines[-1].strip(): |
13 |
> + if len(clold_lines) > 0 and clold_lines[-1].strip(): |
14 |
> f.write(clold_lines[-1]) |
15 |
|
16 |
Good, this fixes a possible IndexError that I complained about in the |
17 |
previous patch. |
18 |
-- |
19 |
Thanks, |
20 |
Zac |