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.

                Regards, Axel
-- 
 ,''`.  |  Axel Beckert <a...@debian.org>, http://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5
  `-    |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE

Reply via email to