Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH 3 of 3] repoman: update copyright on modified files
Date: Wed, 19 Oct 2011 22:15:35
Message-Id: 4E9F4BCC.2030601@gentoo.org
In Reply to: [gentoo-portage-dev] [PATCH 3 of 3] repoman: update copyright on modified files by Fabian Groffen
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

Replies