]> Frank Brehm's Git Trees - my-stuff/py-logrotate.git/commitdiff
Bugfixing
authorFrank Brehm <frank@brehm-online.com>
Mon, 4 Jul 2011 15:42:35 +0000 (15:42 +0000)
committerFrank Brehm <frank@brehm-online.com>
Mon, 4 Jul 2011 15:42:35 +0000 (15:42 +0000)
git-svn-id: http://svn.brehm-online.com/svn/my-stuff/python/PyLogrotate/trunk@276 ec8d2aa5-1599-4edb-8739-2b3a1bc399aa

LogRotateConfig.py
LogRotateHandler.py

index cb35c04989b669a074bc32ea2c9f480e671faa7b..5ede5016ffd30de7d146f2ea0cdd7d86ec21625a 100755 (executable)
@@ -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:
index 94c46cf1db08a9d40f299782c948493ff9acc94b..a82af362a55f485ccd9908e14e21b6e799ac7630 100755 (executable)
@@ -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