]> Frank Brehm's Git Trees - my-stuff/py-logrotate.git/commitdiff
Größerer Umbau Teil 4
authorFrank Brehm <frank@brehm-online.com>
Thu, 14 Jul 2011 21:25:46 +0000 (21:25 +0000)
committerFrank Brehm <frank@brehm-online.com>
Thu, 14 Jul 2011 21:25:46 +0000 (21:25 +0000)
git-svn-id: http://svn.brehm-online.com/svn/my-stuff/python/PyLogrotate/trunk@293 ec8d2aa5-1599-4edb-8739-2b3a1bc399aa

LogRotate/Config.py

index 375212a9fa7913fffd28dc75bf5a4c267e459b1d..3e887ddee57c2d7580c23b3750927a22a2cd413f 100755 (executable)
@@ -1453,27 +1453,30 @@ class LogrotateConfigurationReader(object):
             # Check for create mode
             if len(values) > 0:
                 if self.verbose > 5:
-                    self.logger.debug(
-                        ( _("Trying to determine create mode '%(mode)s'... (file '%(file)s', line %(lnr)s)")
-                            % {'mode': values[0], 'file': filename, 'lnr': linenr})
-                    )
+                    msg = _("Trying to determine create mode '%s' ...") \
+                            % ('values[0]')
+                    msg += " " + ( _("(file '%(file)s', line %(lnr)s)")
+                                % {'file': filename, 'lnr': linenr})
+                    self.logger.debug(msg)
                 mode_octal = values[0]
                 if re.search(r'^0', mode_octal) is None:
                     mode_octal = '0' + mode_octal
                 try:
                     mode = int(mode_octal, 8)
                 except ValueError:
-                    self.logger.warning( ( _("Invalid create mode '%s'.") %(values[1])))
+                    msg = _("Invalid create mode '%s'.") % (values[1])
+                    self.logger.warning(msg)
                     return False
 
             # Check for Owner (user, uid)
             if len(values) > 1:
                 owner_raw = values[1]
                 if self.verbose > 5:
-                    self.logger.debug(
-                        ( _("Trying to determine create owner '%(owner)s'... (file '%(file)s', line %(lnr)s)")
-                            % {'owner': owner_raw, 'file': filename, 'lnr': linenr})
-                    )
+                    msg = _("Trying to determine create owner '%s' ...") \
+                            % (owner_raw)
+                    msg += " " + ( _("(file '%(file)s', line %(lnr)s)")
+                                % {'file': filename, 'lnr': linenr})
+                    self.logger.debug(msg)
                 if re.search(r'^[1-9]\d*$', owner_raw) is not None:
                     owner = int(owner_raw)
                 else:
@@ -1489,10 +1492,11 @@ class LogrotateConfigurationReader(object):
             if len(values) > 2:
                 group_raw = values[2]
                 if self.verbose > 5:
-                    self.logger.debug(
-                        ( _("Trying to determine create group '%(group)s'... (file '%(file)s', line %(lnr)s)")
-                            % {'group': group_raw, 'file': filename, 'lnr': linenr})
-                    )
+                    msg = _("Trying to determine create group '%s' ...") \
+                            % (group_raw)
+                    msg += " " + ( _("(file '%(file)s', line %(lnr)s)")
+                                % {'file': filename, 'lnr': linenr})
+                    self.logger.debug(msg)
                 if re.search(r'^[1-9]\d*$', group_raw) is not None:
                     group = int(group_raw)
                 else: