Bug#855554: unblock: debian-goodies/0.69
On 28/02/17 00:20, Axel Beckert wrote:
> Hi Emilio,
>
> Emilio Pozuelo Monfort wrote:
>>> diff -Nru debian-goodies-0.68/checkrestart debian-goodies-0.69/checkrestart
>>> --- debian-goodies-0.68/checkrestart 2017-01-21 16:27:32.000000000 +0100
>>> +++ debian-goodies-0.69/checkrestart 2017-02-20 02:28:58.000000000 +0100
>>> @@ -126,7 +126,8 @@
>>> checkroot()
>>>
>>> for f in blacklistFiles:
>>> - for line in file(f, "r"):
>>> + blacklistFile = open(f, 'r')
>>> + for line in blacklistFile.readlines():
>>> if line.startswith("#"):
>>> continue
>>> blacklist.append(re.compile(line.strip()))
>>
>> BTW you don't seem to close those files ever. You may want to call f.close(), or
>> use the with statement.
>
> Thanks for the hint. Do you think it can hurt somewhere? checkrestart
> is not a permanently running daemon and I've tested the functionality
> extensively. (What about the old Python 2.7 file statement? That
> didn't have a close either and nobody argued. Or didn't it need a
> close statement while open needs one?)
>
> Anyway, my current plan is to fix that in git, but only upload the fix
> to Stretch if another bug, which validates a freeze exception, shows
> up. I hope that's fine for the release team, too.
That's fine. I don't think this alone warrants another upload.
Cheers,
Emilio
Reply to: