From: Frank Brehm Date: Mon, 4 Jul 2011 15:42:35 +0000 (+0000) Subject: Bugfixing X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=d4c843134845299fb4df35a01e29bcfb812dc2be;p=my-stuff%2Fpy-logrotate.git Bugfixing git-svn-id: http://svn.brehm-online.com/svn/my-stuff/python/PyLogrotate/trunk@276 ec8d2aa5-1599-4edb-8739-2b3a1bc399aa --- diff --git a/LogRotateConfig.py b/LogRotateConfig.py index cb35c04..5ede501 100755 --- a/LogRotateConfig.py +++ b/LogRotateConfig.py @@ -1870,8 +1870,9 @@ class LogrotateConfigurationReader(object): while True: if name in self.scripts: - if 'cmd' in self.scripts[name]: - if len(self.scripts[name].cmd): + cmd = self.scripts[name].cmd + if cmd is not None: + if len(cmd): i += 1 name = template % (i) else: diff --git a/LogRotateHandler.py b/LogRotateHandler.py index 94c46cf..a82af36 100755 --- a/LogRotateHandler.py +++ b/LogRotateHandler.py @@ -723,7 +723,7 @@ class LogrotateHandler(object): if do_it: msg = _("Executing postrun script '%s' ...") % (postscript) self.logger.info(msg) - if not self.scripts[prescript].execute(): + if not self.scripts[postscript].execute(): return self.scripts[postscript].done_postrun = True