On Sun, May 15, 2005 at 09:48:23PM -0300, Adriano Nagelschmidt Rodrigues wrote:
> Package: apt-listchanges > Version: 2.59-0.2 > > I'm running a script to upgrade my system, via cron, with stdout > sent to /dev/null. I would like to receive the changelogs extracted by > apt-listchanges via email. > > However, if I run apt-get with quiet level < 2, I receive an extra > email, due to this write to stderr: > > /usr/lib/site-python/apt_listchanges.py: > > def update_progress(self): > if self.config.quiet > 1: > return > > if not hasattr(self,'message_printed'): > self.message_printed = 1 > sys.stderr.write(_("Reading changelogs") + "...\n") > > > If I run apt-get with quiet level >= 2, I don't receive anything, due > to the last test below: > > /usr/bin/apt-listchanges: > > if config.quiet == 1: > config.frontend = 'text' > elif config.quiet >= 2: > config.frontend = 'mail' > > if config.quiet >= 2 or config.frontend == 'none': > sys.exit(0) > > > I think sys.exit() should be called only if config.quiet > 2. This > way, it would be possible to receive only the changelogs when quiet > level == 2. quiet levels above two are not defined by apt, and I don't think that this justifies creating new semantics there. I think the right thing here is to remove "config.quiet >= 2" from the second test, so that it only exits if config.frontend == 'none.'. Let me know if that change causes it to work the way you expect. -- - mdz -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]