From: Frank Brehm Date: Fri, 15 Jul 2011 11:22:31 +0000 (+0000) Subject: code styling nochmal X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=5106034f74fa7633eef3908a7188ddb5cf98c05c;p=my-stuff%2Fpy-logrotate.git code styling nochmal git-svn-id: http://svn.brehm-online.com/svn/my-stuff/python/PyLogrotate/trunk@297 ec8d2aa5-1599-4edb-8739-2b3a1bc399aa --- diff --git a/LogRotate/Getopts.py b/LogRotate/Getopts.py index ca0ad17..386dcf8 100755 --- a/LogRotate/Getopts.py +++ b/LogRotate/Getopts.py @@ -175,8 +175,10 @@ class LogrotateOptParser(object): ''' #print "" - #print "Default system encoding: »%s«." % (sys.getdefaultencoding()) - #print "Default filesystem encoding: »%s«." % (sys.getfilesystemencoding()) + #print "Default system encoding: »%s«." \ + # % (sys.getdefaultencoding()) + #print "Default filesystem encoding: »%s«." \ + # % (sys.getfilesystemencoding()) #print "" _ = self.t.lgettext @@ -228,7 +230,8 @@ class LogrotateOptParser(object): help = to_unicode_or_bust(msg), ) - msg = _("Checks only the given configuration file and does nothing. Conflicts with -f.") + msg = _("Checks only the given configuration file and does " + + "nothing. Conflicts with -f.") self.parser.add_option( '--config-check', '-c', @@ -256,7 +259,8 @@ class LogrotateOptParser(object): help = to_unicode_or_bust(msg), ) - msg = _('Command to send mail (instead of using SMTP or the predefined sendmail command).') + msg = _("Command to send mail (instead of using SMTP or " + + "the predefined sendmail command).") self.parser.add_option( '--mail', '-m', diff --git a/LogRotate/Handler.py b/LogRotate/Handler.py index a34ccd1..b87399a 100755 --- a/LogRotate/Handler.py +++ b/LogRotate/Handler.py @@ -309,14 +309,14 @@ class LogrotateHandler(object): format_str = '%(levelname)-8s - %(message)s' if verbose: if verbose > 1: - format_str = '[%(asctime)s]: %(name)s %(funcName)s() ' \ - '%(levelname)-8s - %(message)s' + format_str = ('[%(asctime)s]: %(name)s %(funcName)s() ' + + '%(levelname)-8s - %(message)s') if test: - format_str = '%(name)s %(funcName)s() %(levelname)-8s ' \ - '- %(message)s' + format_str = ('%(name)s %(funcName)s() %(levelname)-8s ' + + '- %(message)s') else: - format_str = '[%(asctime)s]: %(name)s %(levelname)-8s ' \ - '- %(message)s' + format_str = ('[%(asctime)s]: %(name)s %(levelname)-8s ' + + '- %(message)s') if test: format_str = '%(name)s %(levelname)-8s - %(message)s' formatter = logging.Formatter(format_str) @@ -447,8 +447,8 @@ class LogrotateHandler(object): try: os.remove(self.pid_file) except OSError, e: - msg = _("Error removing PID file '%(file)s': %(msg)") \ - % { 'file': self.pid_file, 'msg': str(e) } + msg = (_("Error removing PID file '%(file)s': %(msg)") + % { 'file': self.pid_file, 'msg': str(e) }) self.logger.error(msg) #------------------------------------------------------------ @@ -494,8 +494,8 @@ class LogrotateHandler(object): ) if self.verbose > 2: - msg = _("Configuration reader object structure") \ - + ':\n' + str(config_reader) + msg = (_("Configuration reader object structure") + + ':\n' + str(config_reader)) self.logger.debug(msg) try: @@ -507,16 +507,16 @@ class LogrotateHandler(object): if self.verbose > 2: pp = pprint.PrettyPrinter(indent=4) - msg = _("Found global options:") \ - + "\n" + pp.pformat(config_reader.global_option) + msg = (_("Found global options:") + + "\n" + pp.pformat(config_reader.global_option)) self.logger.debug(msg) # Get and set mailer options - if 'mailfrom' in config_reader.global_option and \ - config_reader.global_option['mailfrom']: + if (('mailfrom' in config_reader.global_option) and + (config_reader.global_option['mailfrom'])): self.mailer.from_address = config_reader.global_option['mailfrom'] - if config_reader.global_option['smtphost'] and \ - config_reader.global_option['smtphost'] != 'localhost': + if ((config_reader.global_option['smtphost']) and + (config_reader.global_option['smtphost'] != 'localhost')): self.mailer.smtp_host = config_reader.global_option['smtphost'] if 'smtpport' in config_reader.global_option: self.mailer.smtp_port = config_reader.global_option['smtpport'] @@ -528,22 +528,22 @@ class LogrotateHandler(object): self.mailer.smtp_passwd = config_reader.global_option['smtppasswd'] if self.state_file_name is None: - if 'statusfile' in config_reader.global_option and \ - config_reader.global_option['statusfile'] is not None: + if (('statusfile' in config_reader.global_option) and + (config_reader.global_option['statusfile'] is not None)): self.state_file_name = config_reader.global_option['statusfile'] else: - self.state_file_name = os.sep \ - + os.path.join('var', 'lib', 'py-logrotate.status') + self.state_file_name = (os.sep + + os.path.join('var', 'lib', 'py-logrotate.status')) msg = _("Name of state file: '%s'") % (self.state_file_name) self.logger.debug(msg) if self.pid_file is None: - if 'pidfile' in config_reader.global_option and \ - config_reader.global_option['pidfile'] is not None: + if (('pidfile' in config_reader.global_option) and + (config_reader.global_option['pidfile'] is not None)): self.pid_file = config_reader.global_option['pidfile'] else: - self.pid_file = os.sep \ - + os.path.join('var', 'run', 'py-logrotate.pid') + self.pid_file = (os.sep + + os.path.join('var', 'run', 'py-logrotate.pid')) msg = _("PID file: '%s'") % (self.pid_file) self.logger.debug(msg) @@ -582,8 +582,9 @@ class LogrotateHandler(object): try: f = open(self.pid_file, 'r') except IOError, e: - msg = _("Couldn't open PID file '%(file)s' for reading: %(msg)s") \ - % { 'file': self.pid_file, 'msg': str(e) } + msg = (_("Couldn't open PID file '%(file)s' " + + "for reading: %(msg)s") + % { 'file': self.pid_file, 'msg': str(e) }) raise LogrotateHandlerError(msg) line = f.readline() @@ -595,14 +596,15 @@ class LogrotateHandler(object): if match: pid = int(match.group(1)) else: - msg = _("No useful information found in PID file " - + "'%(file)s': '%(line)s'") \ - % { 'file': self.pid_file, 'line': line } + msg = (_("No useful information found in PID file " + + "'%(file)s': '%(line)s'") + % { 'file': self.pid_file, 'line': line }) self.logger.warn(msg) return False if self.verbose > 1: - self.logger.debug( _("Trying check for process with PID %d ...") % (pid) ) + msg = _("Trying check for process with PID %d ...") % (pid) + self.logger.debug(msg) try: os.kill(pid, 0) except OSError, err: @@ -642,8 +644,8 @@ class LogrotateHandler(object): _ = self.t.lgettext if self.test: - msg = _("Testmode, skip writing of PID file '%s'.") \ - % (self.pid_file) + msg = (_("Testmode, skip writing of PID file '%s'.") + % (self.pid_file)) self.logger.info(msg) return True @@ -656,8 +658,9 @@ class LogrotateHandler(object): f.write(str(os.getppid()) + "\n") f.close() except IOError, e: - msg = _("Couldn't open PID file '%(file)s' for writing: %(msg)s") \ - % { 'file': self.pid_file, 'msg': str(e) } + msg = (_("Couldn't open PID file '%(file)s' " + + "for writing: %(msg)s") + % {'file': self.pid_file, 'msg': str(e)}) raise LogrotateHandlerError(msg) self.pidfile_created = True @@ -694,8 +697,8 @@ class LogrotateHandler(object): # Check for left over scripts to execute for scriptname in self.scripts.keys(): if self.verbose >= 4: - msg = ( _("State of script '%s':") % (scriptname) ) \ - + "\n" + str(self.scripts[scriptname]) + msg = ((_("State of script '%s':") % (scriptname)) + + "\n" + str(self.scripts[scriptname])) self.logger.debug(msg) del self.scripts[scriptname] @@ -723,8 +726,8 @@ class LogrotateHandler(object): if self.verbose >= 4: pp = pprint.PrettyPrinter(indent=4) - msg = _("Rotating of logfile definition:") + \ - "\n" + pp.pformat(definition) + msg = (_("Rotating of logfile definition:") + + "\n" + pp.pformat(definition)) self.logger.debug(msg) # re-reading of status file @@ -782,19 +785,23 @@ class LogrotateHandler(object): # Executing of the firstaction script, if it wasn't executed if firstscript: if self.verbose > 2: - msg = _("Looking, whether the firstaction script should be executed.") + msg = _("Looking, whether the firstaction script " + + "should be executed.") self.logger.debug(msg) if not self.scripts[firstscript].done_firstrun: - msg = _("Executing firstaction script '%s' ...") % (firstscript) + msg = (_("Executing firstaction script '%s' ...") + % (firstscript)) self.logger.info(msg) if not self.scripts[firstscript].execute(): return self.scripts[firstscript].done_firstrun = True - # Executing prerotate scripts, if not sharedscripts or even not executed + # Executing prerotate scripts, if not sharedscripts + # or even not executed if prescript: if self.verbose > 2: - msg = _("Looking, whether the prerun script should be executed.") + msg = _("Looking, whether the prerun script " + + "should be executed.") self.logger.debug(msg) do_it = False if sharedscripts: @@ -819,7 +826,8 @@ class LogrotateHandler(object): # Looking for postrotate script in a similar way like for the prerotate if postscript: if self.verbose > 2: - msg = _("Looking, whether the postrun script should be executed.") + msg = _("Looking, whether the postrun script " + + "should be executed.") self.logger.debug(msg) do_it = False self.scripts[postscript].post_files -= 1 @@ -840,7 +848,8 @@ class LogrotateHandler(object): # Looking for lastaction script if lastscript: if self.verbose > 2: - msg = _("Looking, whether the lastaction script should be executed.") + msg = _("Looking, whether the lastaction script " + + "should be executed.") self.logger.debug(msg) do_it = False self.scripts[lastscript].last_files -= 1 @@ -905,15 +914,18 @@ class LogrotateHandler(object): if pair['compressed']: file_from += compress_extension file_to += compress_extension - msg = _("Moving file '%(from)s' => '%(to)s'.") \ - % {'from': file_from, 'to': file_to } + msg = (_("Moving file '%(from)s' => '%(to)s'.") + % {'from': file_from, 'to': file_to }) self.logger.info(msg) if not self.test: try: shutil.move(file_from, file_to) except OSError: - msg = _("Error on moving '%(from)s' => '%(to)s': %(err)s") \ - % {'from': file_from, 'to': file_to, 'err': e.strerror} + msg = (_("Error on moving '%(from)s' => '%(to)s': " + + "%(err)s") + % {'from': file_from, + 'to': file_to, + 'err': e.strerror}) self.logger.error(msg) return False @@ -928,15 +940,18 @@ class LogrotateHandler(object): # separate between copy(truncate) and move (and create) if definition['copytruncate'] or definition['copy']: # Copying logfile to target - msg = _("Copying file '%(from)s' => '%(to)s'.") \ - % {'from': file_from, 'to': file_to } + msg = (_("Copying file '%(from)s' => '%(to)s'.") + % {'from': file_from, 'to': file_to }) self.logger.info(msg) if not self.test: try: shutil.copy2(file_from, file_to) except OSError: - msg = _("Error on copying '%(from)s' => '%(to)s': %(err)s") \ - % {'from': file_from, 'to': file_to, 'err': e.strerror} + msg = (_("Error on copying '%(from)s' => '%(to)s': " + + "%(err)s") + % {'from': file_from, + 'to': file_to, + 'err': e.strerror}) self.logger.error(msg) return False if definition['copytruncate']: @@ -947,16 +962,17 @@ class LogrotateHandler(object): fd = open(file_from, 'w') fd.close() except IOError, e: - msg = _("Error on truncing file '%(from)s': %(err)s") \ - % {'from': file_from, 'err': str(e)} + msg = (_("Error on truncing file '%(from)s': " + + "%(err)s") + % {'from': file_from, 'err': str(e)}) self.logger.error(msg) return False else: # Moving logfile to target - msg = _("Moving file '%(from)s' => '%(to)s'.") \ - % {'from': file_from, 'to': file_to } + msg = (_("Moving file '%(from)s' => '%(to)s'.") + % {'from': file_from, 'to': file_to }) self.logger.info(msg) # get old permissions of logfile @@ -966,8 +982,11 @@ class LogrotateHandler(object): try: shutil.move(file_from, file_to) except OSError: - msg = _("Error on moving '%(from)s' => '%(to)s': %(err)s") \ - % {'from': file_from, 'to': file_to, 'err': e.strerror} + msg = (_("Error on moving '%(from)s' => '%(to)s': " + + "%(err)s") + % {'from': file_from, + 'to': file_to, + 'err': e.strerror}) self.logger.error(msg) return False @@ -981,8 +1000,9 @@ class LogrotateHandler(object): fd = open(file_from, 'w') fd.close() except IOError, e: - msg = _("Error on creating file '%(from)s': %(err)s") \ - % {'from': file_from, 'err': str(e)} + msg = (_("Error on creating file '%(from)s': " + + "%(err)s") + % {'from': file_from, 'err': str(e)}) self.logger.error(msg) return False @@ -1005,15 +1025,17 @@ class LogrotateHandler(object): # Check and set permissions of new logfile if new_mode != old_mode: - msg = _("Setting permissions of '%(target)s' to %(mode)4o.") \ - % {'target': file_from, 'mode': new_mode} + msg = (_("Setting permissions of '%(target)s' " + + "to %(mode)4o.") + % {'target': file_from, 'mode': new_mode}) self.logger.info(msg) if not self.test: try: os.chmod(file_from, new_mode) except OSError, e: - msg = _("Error on chmod of '%(target)s': %(err)s") \ - % {'target': file_from, 'err': e.strerror} + msg = (_("Error on chmod of '%(target)s': " + + "%(err)s") + % {'target': file_from, 'err': e.strerror}) self.logger.warning(msg) # Check and set ownership of new logfile @@ -1026,18 +1048,26 @@ class LogrotateHandler(object): else: self.logger.warning(msg) else: - msg = _("Setting ownership of '%(file)s' to uid %(uid)d and gid %(gid)d.") \ - % {'file': file_from, 'uid': new_uid, 'gid': new_gid} + msg = (_("Setting ownership of '%(file)s' " + + "to uid %(uid)d and gid %(gid)d.") + % {'file': file_from, + 'uid': new_uid, + 'gid': new_gid}) self.logger.info(msg) if not self.test: try: os.chown(file_from, new_uid, new_gid) except OSError, e: - msg = _("Error on chown of '%(file)s': %(err)s") \ - % {'file': file_from, 'err': e.strerror} + msg = (_("Error on chown of '%(file)s': " + + "%(err)s") + % {'file': file_from, + 'err': e.strerror}) self.logger.warning(msg) - oldfiles = self._collect_old_logfiles(logfile, extension, compress_extension, cur_desc_index) + oldfiles = self._collect_old_logfiles( + logfile, extension, + compress_extension, cur_desc_index + ) # get files to delete and save them back in self.files_delete files_delete = self._collect_files_delete(oldfiles, cur_desc_index) @@ -1045,10 +1075,17 @@ class LogrotateHandler(object): for oldfile in files_delete: self.files_delete[oldfile] = True if definition['mailaddress'] and not definition['mailfirst']: - self.files2send[oldfile] = (definition['mailaddress'], logfile) + self.files2send[oldfile] = ( + definition['mailaddress'], + logfile + ) # get files to compress save them back in self.files_compress - files_compress = self._collect_files_compress(oldfiles, compress_extension, cur_desc_index) + files_compress = self._collect_files_compress( + oldfiles, + compress_extension, + cur_desc_index + ) if len(files_compress): for oldfile in files_compress: self.files_compress[oldfile] = cur_desc_index @@ -1060,7 +1097,10 @@ class LogrotateHandler(object): return True #------------------------------------------------------------ - def _collect_files_compress(self, oldfiles, compress_extension, cur_desc_index): + def _collect_files_compress(self, + oldfiles, + compress_extension, + cur_desc_index): ''' Collects a list with all old logfiles, they have to compress. @@ -1104,24 +1144,29 @@ class LogrotateHandler(object): no_compress = 0 ce = re.escape(compress_extension) - for oldfile in sorted(oldfiles.keys(), key=lambda x: oldfiles[x], reverse=True): + for oldfile in sorted( + oldfiles.keys(), + key=lambda x: oldfiles[x], reverse=True): match = re.search(ce + r'$', oldfile) if match: if self.verbose > 2: - msg = _("File '%s' seems to be compressed, skip it.") % (oldfile) + msg = (_("File '%s' seems to be compressed, skip it.") + % (oldfile)) self.logger.debug(msg) continue if oldfile in self.files_delete: if self.verbose > 2: - msg = _("File '%s' will be deleted, compression unnecessary.") % (oldfile) + msg = (_("File '%s' will be deleted, " + + "compression unnecessary.") % (oldfile)) self.logger.debug(msg) continue if no_compress: if self.verbose > 2: - msg = _("Compression of file '%s' will be delayed.") % (oldfile) + msg = (_("Compression of file '%s' will be delayed.") + % (oldfile)) self.logger.debug(msg) no_compress -= 1 continue @@ -1131,7 +1176,8 @@ class LogrotateHandler(object): if self.verbose > 3: if len(result): pp = pprint.PrettyPrinter(indent=4) - msg = _("Found logfiles to compress:") + "\n" + pp.pformat(result) + msg = (_("Found logfiles to compress:") + + "\n" + pp.pformat(result)) self.logger.debug(msg) else: msg = _("No old logfiles to compress found.") @@ -1141,7 +1187,8 @@ class LogrotateHandler(object): #------------------------------------------------------------ def _collect_files_delete(self, oldfiles, cur_desc_index): ''' - Collects a list with all old (and compressed) logfiles, they have to delete. + Collects a list with all old (and compressed) logfiles, + they have to delete. @param oldfiles: a dict whith all found old logfiles as keys and their modification time as values @@ -1197,15 +1244,17 @@ class LogrotateHandler(object): msg = _("Checking file '%s' for deleting ...") % (oldfile) self.logger.debug(msg) if self.verbose >= 4: - msg = _("Current count: %(count)d, current age: %(age)d seconds") \ - % {'count': count, 'age': age} + msg = (_("Current count: %(count)d, " + + "current age: %(age)d seconds") + % {'count': count, 'age': age}) self.logger.debug(msg) # Delete all files, their count is more than the rotate option if rotate: if count >= rotate: if self.verbose >= 3: - msg = _("Deleting '%s' because of too much.") % (oldfile) + msg = (_("Deleting '%s' because of too much.") + % (oldfile)) self.logger.debug(msg) result.append(oldfile) continue @@ -1214,14 +1263,16 @@ class LogrotateHandler(object): if maxage: if age >= maxage: if self.verbose >= 3: - msg = _("Deleting '%s' because of too old.") % (oldfile) + msg = (_("Deleting '%s' because of too old.") + % (oldfile)) self.logger.debug(msg) result.append(oldfile) if self.verbose > 3: if len(result): pp = pprint.PrettyPrinter(indent=4) - msg = _("Found logfiles to delete:") + "\n" + pp.pformat(result) + msg = (_("Found logfiles to delete:") + + "\n" + pp.pformat(result)) self.logger.debug(msg) else: msg = _("No old logfiles to delete found.") @@ -1229,7 +1280,11 @@ class LogrotateHandler(object): return result #------------------------------------------------------------ - def _collect_old_logfiles(self, logfile, extension, compress_extension, cur_desc_index): + def _collect_old_logfiles(self, + logfile, + extension, + compress_extension, + cur_desc_index): ''' Collect all rotated versions of this logfile and gives back the information about. @@ -1254,7 +1309,8 @@ class LogrotateHandler(object): _ = self.t.lgettext if self.verbose > 2: - msg = _("Retrieving all old logfiles for file '%s' ...") % (logfile) + msg = (_("Retrieving all old logfiles for file '%s' ...") + % (logfile)) self.logger.debug(msg) result = {} @@ -1271,25 +1327,32 @@ class LogrotateHandler(object): olddir = definition['olddir']['dirname'] # Substitution of $dirname - olddir = re.sub(r'(?:\${dirname}|\$dirname(?![a-zA-Z0-9_]))', dirname, olddir) + pat = r'(?:\${dirname}|\$dirname(?![a-zA-Z0-9_]))' + olddir = re.sub(pat, dirname, olddir) # Substitution of $basename - olddir = re.sub(r'(?:\${basename}|\$basename(?![a-zA-Z0-9_]))', basename, olddir) + pat = r'(?:\${basename}|\$basename(?![a-zA-Z0-9_]))' + olddir = re.sub(pat, basename, olddir) # Substitution of $nodename - olddir = re.sub(r'(?:\${nodename}|\$nodename(?![a-zA-Z0-9_]))', self.template['nodename'], olddir) + pat = r'(?:\${nodename}|\$nodename(?![a-zA-Z0-9_]))' + olddir = re.sub(pat, self.template['nodename'], olddir) # Substitution of $domain - olddir = re.sub(r'(?:\${domain}|\$domain(?![a-zA-Z0-9_]))', self.template['domain'], olddir) + pat = r'(?:\${domain}|\$domain(?![a-zA-Z0-9_]))' + olddir = re.sub(pat, self.template['domain'], olddir) # Substitution of $machine - olddir = re.sub(r'(?:\${machine}|\$machine(?![a-zA-Z0-9_]))', self.template['machine'], olddir) + pat = r'(?:\${machine}|\$machine(?![a-zA-Z0-9_]))' + olddir = re.sub(pat, self.template['machine'], olddir) # Substitution of $release - olddir = re.sub(r'(?:\${release}|\$release(?![a-zA-Z0-9_]))', self.template['release'], olddir) + pat = r'(?:\${release}|\$release(?![a-zA-Z0-9_]))' + olddir = re.sub(pat, self.template['release'], olddir) # Substitution of $sysname - olddir = re.sub(r'(?:\${sysname}|\$sysname(?![a-zA-Z0-9_]))', self.template['sysname'], olddir) + pat = r'(?:\${sysname}|\$sysname(?![a-zA-Z0-9_]))' + olddir = re.sub(pat, self.template['sysname'], olddir) if not os.path.isabs(olddir): olddir = os.path.join(dirname, olddir) @@ -1309,7 +1372,8 @@ class LogrotateHandler(object): # day of month olddir = re.sub(r'%d', '[0-9][0-9]', olddir) # date as %m/%d/%y - olddir = re.sub(r'%[Dx]', '[0-9][0-9]/[0-9][0-9]/[0-9][0-9]', olddir) + subst = '[0-9][0-9]/[0-9][0-9]/[0-9][0-9]' + olddir = re.sub(r'%[Dx]', subst, olddir) # Hour in 24-hours format olddir = re.sub(r'%H', '[012][0-9]', olddir) # Hour in 12-hours format @@ -1321,13 +1385,15 @@ class LogrotateHandler(object): # AM/PM olddir = re.sub(r'%p', '[AP]M', olddir) # complete time in 12-hours format with AM/PM - olddir = re.sub(r'%r', '[01][0-9]:[0-5][0-9]:[0-5][0-9] [AP]M', olddir) + subst = '[01][0-9]:[0-5][0-9]:[0-5][0-9] [AP]M' + olddir = re.sub(r'%r', subst, olddir) # time in format %H:%M olddir = re.sub(r'%R', '[012][0-9]:[0-5][0-9]', olddir) # seconds olddir = re.sub(r'%S', '[0-5][0-9]', olddir) # complete time in 24-hours format - olddir = re.sub(r'%[TX]', '[012][0-9]:[0-5][0-9]:[0-5][0-9]', olddir) + subst = '[012][0-9]:[0-5][0-9]:[0-5][0-9]' + olddir = re.sub(r'%[TX]', subst, olddir) # weekday as a number (0-7) olddir = re.sub(r'%[uw]', '[0-7]', olddir) # number of week in year (00-53) @@ -1350,8 +1416,10 @@ class LogrotateHandler(object): pattern_list.append(file_pattern + '.[0-9]' + extension) pattern_list.append(file_pattern + '.[0-9][0-9]' + extension) pattern_list.append(file_pattern + '.[0-9][0-9][0-9]' + extension) - pattern_list.append(file_pattern + '.[0-9][0-9][0-9][0-9]' + extension) - pattern_list.append(file_pattern + '.[0-9][0-9][0-9][0-9][0-9]' + extension) + pattern_list.append(file_pattern + + '.[0-9][0-9][0-9][0-9]' + extension) + pattern_list.append(file_pattern + + '.[0-9][0-9][0-9][0-9][0-9]' + extension) if definition['compress']: ext = extension + compress_extension @@ -1359,8 +1427,10 @@ class LogrotateHandler(object): pattern_list.append(file_pattern + '.[0-9]' + ext) pattern_list.append(file_pattern + '.[0-9][0-9]' + ext) pattern_list.append(file_pattern + '.[0-9][0-9][0-9]' + ext) - pattern_list.append(file_pattern + '.[0-9][0-9][0-9][0-9]' + ext) - pattern_list.append(file_pattern + '.[0-9][0-9][0-9][0-9][0-9]' + ext) + pattern_list.append(file_pattern + + '.[0-9][0-9][0-9][0-9]' + ext) + pattern_list.append(file_pattern + + '.[0-9][0-9][0-9][0-9][0-9]' + ext) for pattern in pattern_list: if self.verbose > 2: @@ -1404,9 +1474,15 @@ class LogrotateHandler(object): }, 'move': [ ... - { 'from': , 'to': , 'compressed': True}, - { 'from': , 'to': , 'compressed': True}, - { 'from': , 'to': , 'compressed': False}, + { 'from': , + 'to': , + 'compressed': True}, + { 'from': , + 'to': , + 'compressed': True}, + { 'from': , + 'to': , + 'compressed': False}, ], } @@ -1419,8 +1495,9 @@ class LogrotateHandler(object): _ = self.t.lgettext if self.verbose > 2: - msg = _("Retrieving all movings and rotations for logfile '%(file)s' to target '%(target)s' ...") \ - % {'file': logfile, 'target': target} + msg = (_("Retrieving all movings and rotations " + + "for logfile '%(file)s' to target '%(target)s' ...") + % {'file': logfile, 'target': target}) self.logger.debug(msg) result = { 'rotate': {}, 'move': [] } @@ -1466,18 +1543,20 @@ class LogrotateHandler(object): # resulting target exists, retrieve cyclic rotation if os.path.exists(resulting_target): if self.verbose > 3: - msg = _("Resulting target '%s' exists, retrieve cyclic rotation ...") \ - % (resulting_target) + msg = (_("Resulting target '%s' exists, retrieve " + + "cyclic rotation ...") % (resulting_target)) self.logger.debug(msg) target_wo_cext_old = target_wo_number + "." + str(i) target_with_cext_old = target_wo_cext_old + compress_extension - while os.path.exists(target_wo_cext_old) or os.path.exists(target_with_cext_old): + while (os.path.exists(target_wo_cext_old) or + os.path.exists(target_with_cext_old)): i += 1 target_wo_cext_new = target_wo_number + "." + str(i) target_with_cext_new = target_wo_cext_new + compress_extension if self.verbose > 4: - msg = _("Cyclic rotation from '%(from)s' to '%(to)s'.") \ - % {'from': target_wo_cext_old, 'to': target_wo_cext_new} + msg = (_("Cyclic rotation from '%(from)s' to '%(to)s'.") + % {'from': target_wo_cext_old, + 'to': target_wo_cext_new}) self.logger.debug(msg) pair = { 'from': target_wo_cext_old, @@ -1521,7 +1600,8 @@ class LogrotateHandler(object): _ = self.t.lgettext if self.verbose > 2: - msg = _("Retrieving the name of the rotated file of '%s' ...") % (logfile) + msg = (_("Retrieving the name of the rotated file of '%s' ...") + % (logfile)) self.logger.debug(msg) target = logfile @@ -1535,14 +1615,16 @@ class LogrotateHandler(object): pattern = '%Y-%m-%d' dateext = datetime.utcnow().strftime(pattern) if self.verbose > 3: - msg = _("Using date extension '.%(ext)s' from pattern '%(pattern)s'.") \ - % {'ext': dateext, 'pattern': pattern} + msg = (_("Using date extension '.%(ext)s' from " + + "pattern '%(pattern)s'.") + % {'ext': dateext, 'pattern': pattern}) self.logger.debug(msg) target += "." + dateext if self.verbose > 1: - msg = _("Using '%(target)s' as target for rotation of logfile '%(logfile)s'.") \ - % {'target': target, 'logfile': logfile} + msg = (_("Using '%(target)s' as target for rotation " + + "of logfile '%(logfile)s'.") + % {'target': target, 'logfile': logfile}) self.logger.debug(msg) return target @@ -1598,25 +1680,32 @@ class LogrotateHandler(object): olddir = datetime.utcnow().strftime(olddir) # Substitution of $dirname - olddir = re.sub(r'(?:\${dirname}|\$dirname(?![a-zA-Z0-9_]))', dirname, olddir) + pat = r'(?:\${dirname}|\$dirname(?![a-zA-Z0-9_]))' + olddir = re.sub(pat, dirname, olddir) # Substitution of $basename - olddir = re.sub(r'(?:\${basename}|\$basename(?![a-zA-Z0-9_]))', basename, olddir) + pat = r'(?:\${basename}|\$basename(?![a-zA-Z0-9_]))' + olddir = re.sub(pat, basename, olddir) # Substitution of $nodename - olddir = re.sub(r'(?:\${nodename}|\$nodename(?![a-zA-Z0-9_]))', self.template['nodename'], olddir) + pat = r'(?:\${nodename}|\$nodename(?![a-zA-Z0-9_]))' + olddir = re.sub(pat, self.template['nodename'], olddir) # Substitution of $domain - olddir = re.sub(r'(?:\${domain}|\$domain(?![a-zA-Z0-9_]))', self.template['domain'], olddir) + pat = r'(?:\${domain}|\$domain(?![a-zA-Z0-9_]))' + olddir = re.sub(pat, self.template['domain'], olddir) # Substitution of $machine - olddir = re.sub(r'(?:\${machine}|\$machine(?![a-zA-Z0-9_]))', self.template['machine'], olddir) + pat = r'(?:\${machine}|\$machine(?![a-zA-Z0-9_]))' + olddir = re.sub(pat, self.template['machine'], olddir) # Substitution of $release - olddir = re.sub(r'(?:\${release}|\$release(?![a-zA-Z0-9_]))', self.template['release'], olddir) + pat = r'(?:\${release}|\$release(?![a-zA-Z0-9_]))' + olddir = re.sub(pat, self.template['release'], olddir) # Substitution of $sysname - olddir = re.sub(r'(?:\${sysname}|\$sysname(?![a-zA-Z0-9_]))', self.template['sysname'], olddir) + pat = r'(?:\${sysname}|\$sysname(?![a-zA-Z0-9_]))' + olddir = re.sub(pat, self.template['sysname'], olddir) if not os.path.isabs(olddir): olddir = os.path.join(dirname, olddir) @@ -1631,19 +1720,22 @@ class LogrotateHandler(object): if os.path.isdir(olddir): if os.access(olddir, (os.W_OK | os.X_OK)): if self.verbose > 2: - msg = _("Olddir '%s' allready exists, not created.") % (olddir) + msg = (_("Olddir '%s' allready exists, not created.") + % (olddir)) self.logger.debug(msg) olddir = os.path.realpath(olddir) return olddir else: - msg = _("No write and execute access to olddir '%s'.") % (olddir) + msg = (_("No write and execute access to olddir '%s'.") + % (olddir)) if self.test: self.logger.warning(msg) return olddir raise LogrotateHandlerError(msg) return None else: - msg = _("Olddir '%s' exists, but is not a valid directory.") % (olddir) + msg = (_("Olddir '%s' exists, but is not a valid directory.") + % (olddir)) raise LogrotateHandlerError(msg) return None @@ -1676,7 +1768,8 @@ class LogrotateHandler(object): if os.path.exists(create_dir): if os.path.isdir(create_dir): if self.verbose > 3: - msg = _("Directory '%s' allready exists, not created.") % (create_dir) + msg = (_("Directory '%s' allready exists, " + + "not created.") % (create_dir)) self.logger.debug(msg) parent_statinfo = os.stat(create_dir) parent_mode = parent_statinfo.st_mode @@ -1684,7 +1777,8 @@ class LogrotateHandler(object): parent_gid = parent_statinfo.st_gid continue else: - msg = _("Directory '%s' exists, but is not a valid directory.") % (create_dir) + msg = (_("Directory '%s' exists, but is not a " + + "valid directory.") % (create_dir)) self.logger.error(msg) return None msg = _("Creating directory '%s' ...") % (create_dir) @@ -1699,8 +1793,11 @@ class LogrotateHandler(object): if o['group'] is not None: create_gid = o['group'] if self.verbose > 1: - msg = _("Create permissions: %(mode)4o, Owner-UID: %(uid)d, Group-GID: %(gid)d") \ - % {'mode': create_mode, 'uid': create_uid, 'gid': create_gid} + msg = (_("Create permissions: %(mode)4o, " + + "Owner-UID: %(uid)d, Group-GID: %(gid)d") + % {'mode': create_mode, + 'uid': create_uid, + 'gid': create_gid}) self.logger.debug(msg) if not self.test: if self.verbose > 2: @@ -1709,8 +1806,8 @@ class LogrotateHandler(object): try: os.mkdir(create_dir, create_mode) except OSError, e: - msg = _("Error on creating directory '%(dir)s': %(err)s") \ - % {'dir': create_dir, 'err': e.strerror} + msg = (_("Error on creating directory '%(dir)s': %(err)s") + % {'dir': create_dir, 'err': e.strerror}) self.logger.error(msg) return None if (create_uid != uid) or (create_gid != gid): @@ -1723,13 +1820,15 @@ class LogrotateHandler(object): self.logger.warning(msg) else: if self.verbose > 2: - msg = "os.chown('%s', %d, %d)" % (create_dir, create_uid, create_gid) + msg = ("os.chown('%s', %d, %d)" + % (create_dir, create_uid, create_gid)) self.logger.debug(msg) try: os.chown(create_dir, create_uid, create_gid) except OSError, e: - msg = _("Error on chowning directory '%(dir)s': %(err)s") \ - % {'dir': create_dir, 'err': e.strerror} + msg = (_("Error on chowning directory " + + "'%(dir)s': %(err)s") + % {'dir': create_dir, 'err': e.strerror}) self.logger.error(msg) return None @@ -1815,19 +1914,22 @@ class LogrotateHandler(object): return False if not os.path.isfile(logfile): - msg = _("Logfile '%s' is not a regular file, not rotated.") % (logfile) + msg = (_("Logfile '%s' is not a regular file, not rotated.") + % (logfile)) self.logger.warning(msg) return False filesize = os.path.getsize(logfile) if self.verbose > 2: - msg = _("Filesize of '%(file)s': %(size)d.") % {'file': logfile, 'size': filesize} + msg = (_("Filesize of '%(file)s': %(size)d.") + % {'file': logfile, 'size': filesize}) self.logger.debug(msg) if not filesize: if not definition['ifempty']: if self.verbose > 1: - msg = _("Logfile '%s' has a filesize of Zero, not rotated.") % (logfile) + msg = (_("Logfile '%s' has a filesize of Zero, " + + "not rotated.") % (logfile)) self.logger.debug(msg) return False @@ -1843,25 +1945,29 @@ class LogrotateHandler(object): last_rotated = self.state_file.get_rotation_date(logfile) if self.verbose > 2: - msg = _("Date of last rotation: %s.") % (last_rotated.isoformat(' ')) + msg = (_("Date of last rotation: %s.") + % (last_rotated.isoformat(' '))) self.logger.debug(msg) next_rotation = last_rotated + timedelta(days = definition['period']) if self.verbose > 2: - msg = _("Date of next rotation: %s.") % (next_rotation.isoformat(' ')) + msg = (_("Date of next rotation: %s.") + % (next_rotation.isoformat(' '))) self.logger.debug(msg) if filesize < maxsize: if self.verbose > 1: - msg = _("Filesize %(filesize)d is less than %(maxsize)d, rotation not necessary.") \ - % {'filesize': filesize, 'maxsize': maxsize} + msg = (_("Filesize %(filesize)d is less than %(maxsize)d, " + + "rotation not necessary.") + % {'filesize': filesize, 'maxsize': maxsize}) self.logger.debug(msg) return False curdate = datetime.utcnow().replace(tzinfo = utc) if next_rotation > curdate: if self.verbose > 1: - msg = _("Date of next rotation '%(next)s' is in future, rotation not necessary.") \ - % {'next': next_rotation.isoformat(' ')} + msg = (_("Date of next rotation '%(next)s' is in future, " + + "rotation not necessary.") + % {'next': next_rotation.isoformat(' ')}) self.logger.debug(msg) return False @@ -1891,8 +1997,8 @@ class LogrotateHandler(object): try: os.remove(logfile) except OSError, e: - msg = _("Error on removing file '%(file)s': %(err)s") \ - % {'file': logfile, 'err': e.strerror} + msg = (_("Error on removing file '%(file)s': %(err)s") + % {'file': logfile, 'err': e.strerror}) self.logger.error(msg) return @@ -1929,30 +2035,35 @@ class LogrotateHandler(object): # Check existence source logfile if not os.path.exists(logfile): - msg = _("Source file '%s' for compression doesn't exists.") % (logfile) + msg = (_("Source file '%s' for compression doesn't exists.") + % (logfile)) raise LogrotateHandlerError(msg) return # Check existence target (compressed file) if os.path.exists(target): if os.path.samefile(logfile, target): - msg = _("Source file '%(source)s' and target file '%(target)s' are the same file.") \ - % {'source': logfile, 'target': target} + msg = (_("Source file '%(source)s' and target file " + + "'%(target)s' are the same file.") + % {'source': logfile, 'target': target}) raise LogrotateHandlerError(msg) return - msg = _("Target file '%s' for compression allready exists.") %(target) + msg = (_("Target file '%s' for compression allready exists.") + % (target)) self.logger.warning(msg) # Check for filesize Zero => not compressed filesize = os.path.getsize(logfile) if filesize <= 0: - msg = _("File '%s' has a size of 0, skip compressing.") % (logfile) + msg = (_("File '%s' has a size of 0, skip compressing.") + % (logfile)) self.logger.info(msg) continue # Execute compressing ... - msg = _("Compressing file '%(file)s' to '%(target)s' with '%(cmd)s' ...") \ - % {'file': logfile, 'target': target, 'cmd': command} + msg = (_("Compressing file '%(file)s' to '%(target)s' " + + "with '%(cmd)s' ...") + % {'file': logfile, 'target': target, 'cmd': command}) self.logger.info(msg) if command == 'internal_gzip': @@ -1962,7 +2073,12 @@ class LogrotateHandler(object): elif command == 'internal_zip': self._compress_internal_zip(logfile, target) else: - self._compress_external(logfile, target, command, compress_opts) + self._compress_external( + logfile, + target, + command, + compress_opts + ) return @@ -1993,8 +2109,9 @@ class LogrotateHandler(object): _ = self.t.lgettext if self.verbose > 1: - msg = _("Compressing source '%(source)s' to target'%(target)s' with command '%(cmd)s'.") \ - % {'source': source, 'target': target, 'cmd': command} + msg = (_("Compressing source '%(source)s' to target " + + "'%(target)s' with command '%(cmd)s'.") + % {'source': source, 'target': target, 'cmd': command}) self.logger.debug(msg) if options is None: @@ -2004,8 +2121,9 @@ class LogrotateHandler(object): match = re.search(r'\[\]', options) if match: if self.verbose > 3: - msg = _("Substituting '%(what)s' in compressoptions with '%(by)s'.") \ - % {'what': '[]', 'by': target} + msg = (_("Substituting '%(what)s' in compressoptions " + + "with '%(by)s'.") + % {'what': '[]', 'by': target}) self.logger.debug(msg) options = re.sub(r'\[\]', '"' + target + '"', options) @@ -2013,8 +2131,9 @@ class LogrotateHandler(object): match = re.search(r'\{\}', options) if match: if self.verbose > 3: - msg = _("Substituting '%(what)s' in compressoptions with '%(by)s'.") \ - % {'what': '{}', 'by': source} + msg = (_("Substituting '%(what)s' in compressoptions " + + "with '%(by)s'.") + % {'what': '{}', 'by': source}) self.logger.debug(msg) options = re.sub(r'\{\}', '"' + source + '"', options) else: @@ -2033,8 +2152,8 @@ class LogrotateHandler(object): if not self.test: if not os.path.exists(target): - msg = _("Target '%s' of compression doesn't exists after executing compression command.") \ - % (target) + msg = (_("Target '%s' of compression doesn't exists " + + "after executing compression command.") % (target)) self.logger.error(msg) return False @@ -2051,8 +2170,9 @@ class LogrotateHandler(object): try: os.remove(source) except OSError, e: - msg = _("Error removing uncompressed file '%(file)s': %(msg)") \ - % {'file': source, 'msg': str(e) } + msg = (_("Error removing uncompressed file " + + "'%(file)s': %(msg)") + % {'file': source, 'msg': str(e) }) self.logger.error(msg) return False @@ -2079,7 +2199,8 @@ class LogrotateHandler(object): or None, if statinfo was given, has precedence before a given statinfo @type source: str or None - @param statinfo: stat object from os.stat() or None, if source was given + @param statinfo: stat object from os.stat() or None, if + source was given @type statinfo: stat-object or None @return: success or not @@ -2089,7 +2210,8 @@ class LogrotateHandler(object): _ = self.t.lgettext if source is None and statinfo is None: - msg = _("Neither 'target' nor 'statinfo' was given on calling _copy_file_metadata().") + msg = _("Neither 'target' nor 'statinfo' was given " + + "on calling _copy_file_metadata().") raise LogrotateHandlerError(msg) return False @@ -2120,8 +2242,9 @@ class LogrotateHandler(object): # Copying permissions and timestamps from source to target if self.verbose > 1: - msg = _("Copying permissions and timestamps from source '%(src)s' to target '%(target)s'.") \ - % {'src': source, 'target': target} + msg = (_("Copying permissions and timestamps from source " + + "'%(src)s' to target '%(target)s'.") + % {'src': source, 'target': target}) self.logger.debug(msg) if not self.test: shutil.copystat(source, target) @@ -2142,8 +2265,9 @@ class LogrotateHandler(object): try: os.utime(target, (atime, mtime)) except OSError, e: - msg = _("Error on setting times on target file '%(target)s': %(err)s") \ - % {'target': target, 'err': e.strerror} + msg = (_("Error on setting times on target file " + + "'%(target)s': %(err)s") + % {'target': target, 'err': e.strerror}) self.logger.warning(msg) return False @@ -2151,15 +2275,16 @@ class LogrotateHandler(object): old_mode = old_statinfo.st_mode if mode != old_mode: if self.verbose > 1: - msg = _("Setting permissions of '%(target)s' to %(mode)4o.") \ - % {'target': target, 'mode': new_mode} + msg = (_("Setting permissions of '%(target)s' " + + "to %(mode)4o.") + % {'target': target, 'mode': new_mode}) self.logger.info(msg) if not self.test: try: os.chmod(target, mode) except OSError, e: - msg = _("Error on chmod of '%(target)s': %(err)s") \ - % {'target': target, 'err': e.strerror} + msg = (_("Error on chmod of '%(target)s': %(err)s") + % {'target': target, 'err': e.strerror}) self.logger.warning(msg) return False @@ -2186,8 +2311,8 @@ class LogrotateHandler(object): try: os.chown(target, old_uid, old_gid) except OSError, e: - msg = _("Error on chown of '%(file)s': %(err)s") \ - % {'file': target, 'err': e.strerror} + msg = (_("Error on chown of '%(file)s': %(err)s") + % {'file': target, 'err': e.strerror}) self.logger.warning(msg) return False @@ -2213,12 +2338,12 @@ class LogrotateHandler(object): _ = self.t.lgettext if self.verbose > 1: - msg = _("Compressing source '%(source)s' to target " - + "'%(target)s' with module '%(module)s'.") \ + msg = (_("Compressing source '%(source)s' to target " + + "'%(target)s' with module '%(module)s'.") % { 'source': source, 'target': target, 'module': 'zipfile' - } + }) self.logger.debug(msg) if not self.test: @@ -2232,8 +2357,8 @@ class LogrotateHandler(object): compression=zipfile.ZIP_DEFLATED ) except IOError, e: - msg = _("Error on open file '%(file)s' on writing: %(err)s") \ - % {'file': target, 'err': str(e)} + msg = (_("Error on open file '%(file)s' on writing: %(err)s") + % {'file': target, 'err': str(e)}) self.logger.error(msg) return False @@ -2252,8 +2377,8 @@ class LogrotateHandler(object): try: os.remove(source) except OSError, e: - msg = _("Error removing uncompressed file '%(file)s': %(msg)") \ - % {'file': source, 'msg': str(e) } + msg = (_("Error removing uncompressed file '%(file)s': %(msg)") + % {'file': source, 'msg': str(e) }) self.logger.error(msg) return False @@ -2280,12 +2405,12 @@ class LogrotateHandler(object): _ = self.t.lgettext if self.verbose > 1: - msg = _("Compressing source '%(source)s' to target " - + "'%(target)s' with module '%(module)s'.") \ + msg = (_("Compressing source '%(source)s' to target " + + "'%(target)s' with module '%(module)s'.") % { 'source': source, 'target': target, 'module': 'gzip' - } + }) self.logger.debug(msg) if not self.test: @@ -2294,8 +2419,8 @@ class LogrotateHandler(object): try: f_in = open(source, 'rb') except IOError, e: - msg = _("Error on open file '%(file)s' on reading: %(err)s") \ - % {'file': source, 'err': str(e)} + msg = (_("Error on open file '%(file)s' on reading: %(err)s") + % {'file': source, 'err': str(e)}) self.logger.error(msg) return False @@ -2304,8 +2429,8 @@ class LogrotateHandler(object): try: f_out = gzip.open(target, 'wb') except IOError, e: - msg = _("Error on open file '%(file)s' on writing: %(err)s") \ - % {'file': target, 'err': str(e)} + msg = (_("Error on open file '%(file)s' on writing: %(err)s") + % {'file': target, 'err': str(e)}) self.logger.error(msg) f_in.close() return False @@ -2327,8 +2452,8 @@ class LogrotateHandler(object): try: os.remove(source) except OSError, e: - msg = _("Error removing uncompressed file '%(file)s': %(msg)") \ - % {'file': source, 'msg': str(e) } + msg = (_("Error removing uncompressed file '%(file)s': %(msg)") + % {'file': source, 'msg': str(e) }) self.logger.error(msg) return False @@ -2355,12 +2480,12 @@ class LogrotateHandler(object): _ = self.t.lgettext if self.verbose > 1: - msg = _("Compressing source '%(source)s' to target " - + "'%(target)s' with module '%(module)s'.") \ + msg = (_("Compressing source '%(source)s' to target " + + "'%(target)s' with module '%(module)s'.") % { 'source': source, 'target': target, 'module': 'bz2' - } + }) self.logger.debug(msg) if not self.test: @@ -2369,8 +2494,8 @@ class LogrotateHandler(object): try: f_in = open(source, 'rb') except IOError, e: - msg = _("Error on open file '%(file)s' on reading: %(err)s") \ - % {'file': source, 'err': str(e)} + msg = (_("Error on open file '%(file)s' on reading: %(err)s") + % {'file': source, 'err': str(e)}) self.logger.error(msg) return False @@ -2379,8 +2504,8 @@ class LogrotateHandler(object): try: f_out = bz2.BZ2File(target, 'w') except IOError, e: - msg = _("Error on open file '%(file)s' on writing: %(err)s") \ - % {'file': target, 'err': str(e)} + msg = (_("Error on open file '%(file)s' on writing: %(err)s") + % {'file': target, 'err': str(e)}) self.logger.error(msg) f_in.close() return False @@ -2402,8 +2527,8 @@ class LogrotateHandler(object): try: os.remove(source) except OSError, e: - msg = _("Error removing uncompressed file '%(file)s': %(msg)") \ - % {'file': source, 'msg': str(e) } + msg = (_("Error removing uncompressed file '%(file)s': %(msg)") + % {'file': source, 'msg': str(e) }) self.logger.error(msg) return False @@ -2424,7 +2549,11 @@ class LogrotateHandler(object): self.logger.debug(msg) for filename in self.files2send.keys(): - self.mailer.send_file(filename, self.files2send[filename][0], self.files2send[filename][1]) + self.mailer.send_file( + filename, + self.files2send[filename][0], + self.files2send[filename][1] + ) return diff --git a/LogRotate/Mailer.py b/LogRotate/Mailer.py index 957c839..3afda74 100755 --- a/LogRotate/Mailer.py +++ b/LogRotate/Mailer.py @@ -238,7 +238,12 @@ class LogRotateMailer(object): ''' self._init_from_address() - from_address = property(_get_from_address, _set_from_address, _del_from_address, "The mail address of the sender") + from_address = property( + _get_from_address, + _set_from_address, + _del_from_address, + "The mail address of the sender" + ) #------------------------------------------------------------ # Property 'sendmail' @@ -274,7 +279,8 @@ class LogRotateMailer(object): self.logger.warning(msg) return else: - msg = _("Only absolute path allowed for a sendmail command: '%s'.") % (value) + msg = (_("Only absolute path allowed for a " + + "sendmail command: '%s'.") % (value)) self.logger.warning(msg) return @@ -284,7 +290,12 @@ class LogRotateMailer(object): ''' self._sendmail = None - sendmail = property(_get_sendmail, _set_sendmail, _del_sendmail, "The sendmail executable for sending mails local") + sendmail = property( + _get_sendmail, + _set_sendmail, + _del_sendmail, + "The sendmail executable for sending mails local" + ) #------------------------------------------------------------ # Property 'smtp_host' @@ -302,7 +313,12 @@ class LogRotateMailer(object): if value: self._smtp_host = value - smtp_host = property(_get_smtp_host, _set_smtp_host, None, "The hostname to use for sending mails via SMTP (smarthost)") + smtp_host = property( + _get_smtp_host, + _set_smtp_host, + None, + "The hostname to use for sending mails via SMTP (smarthost)" + ) #------------------------------------------------------------ # Property 'smtp_port' @@ -327,7 +343,12 @@ class LogRotateMailer(object): return self._smtp_port = port - smtp_port = property(_get_smtp_port, _set_smtp_port, None, "The port to use for sending mails via SMTP") + smtp_port = property( + _get_smtp_port, + _set_smtp_port, + None, + "The port to use for sending mails via SMTP" + ) #------------------------------------------------------------ # Property 'smtp_tls' @@ -343,7 +364,12 @@ class LogRotateMailer(object): ''' self._smtp_tls = bool(value) - smtp_tls = property(_get_smtp_tls, _set_smtp_tls, None, "Use TLS for sending mails via SMTP (smarthost)") + smtp_tls = property( + _get_smtp_tls, + _set_smtp_tls, + None, + "Use TLS for sending mails via SMTP (smarthost)" + ) #------------------------------------------------------------ # Other Methods @@ -442,8 +468,8 @@ class LogRotateMailer(object): if os.path.exists(prog): if os.access(prog, os.X_OK): if self.verbose > 1: - msg = _("Using '%s' as the sendmail command.") % (prog) - self.logger.debug(msg) + msg = _("Using '%s' as the sendmail command.") % (prog) + self.logger.debug(msg) self._sendmail = prog break else: @@ -453,7 +479,8 @@ class LogRotateMailer(object): return #------------------------------------------------------- - def send_file(self, + def send_file( + self, filename, addresses, original=None, @@ -509,17 +536,29 @@ class LogRotateMailer(object): if not rotate_date: rotate_date = datetime.now() - msg = _("Sending mail with attached file '%(file)s' to: %(rcpt)s") \ + msg = (_("Sending mail with attached file '%(file)s' to: %(rcpt)s") % {'file': basename, - 'rcpt': ', '.join(map(lambda x: '"' + email.utils.formataddr(x) + '"', addresses))} + 'rcpt': ', '.join( + map(lambda x: ('"' + + email.utils.formataddr(x) + + '"'), + addresses + ) + ) + }) self.logger.debug(msg) mail_container = MIMEMultipart() - mail_container['Subject'] = ( "Rotated logfile '%s'" % (filename) ) - mail_container['X-Mailer'] = ( "pylogrotate version %s" % (self.mailer_version) ) - mail_container['From'] = self.from_address - mail_container['To'] = ', '.join(map(lambda x: email.utils.formataddr(x), addresses)) - mail_container.preamble = 'You will not see this in a MIME-aware mail reader.\n' + mail_container['Subject'] = ( "Rotated logfile '%s'" % (filename) ) + mail_container['X-Mailer'] = ( "pylogrotate version %s" + % (self.mailer_version) ) + mail_container['From'] = self.from_address + mail_container['To'] = ', '.join( + map(lambda x: email.utils.formataddr(x), addresses) + ) + mail_container.preamble = ( + 'You will not see this in a MIME-aware mail reader.\n' + ) # Generate Text of the first part of mail body mailtext = "Rotated Logfile:\n\n" @@ -529,15 +568,20 @@ class LogRotateMailer(object): mailtext += "Date of rotation: " + rotate_date.isoformat(' ') mailtext += "\n" mailtext = _encodestring(mailtext, quotetabs=False) - mail_part = MIMENonMultipart('text', 'plain', charset=sys.getdefaultencoding()) + mail_part = MIMENonMultipart( + 'text', + 'plain', + charset=sys.getdefaultencoding() + ) mail_part.set_payload(mailtext) mail_part['Content-Transfer-Encoding'] = 'quoted-printable' mail_container.attach(mail_part) ctype, encoding = mimetypes.guess_type(filename) if self.verbose > 3: - msg = _("Guessed content-type: '%(ctype)s' and encoding '%(encoding)s'.") \ - % {'ctype': ctype, 'encoding': encoding } + msg = (_("Guessed content-type: '%(ctype)s' " + + "and encoding '%(encoding)s'.") + % {'ctype': ctype, 'encoding': encoding }) self.logger.debug(msg) if encoding: @@ -563,7 +607,11 @@ class LogRotateMailer(object): mail_part['Content-Transfer-Encoding'] = 'quoted-printable' else: encoders.encode_base64(mail_part) - mail_part.add_header('Content-Disposition', 'attachment', filename=basename) + mail_part.add_header( + 'Content-Disposition', + 'attachment', + filename=basename + ) mail_container.attach(mail_part) composed = mail_container.as_string() diff --git a/LogRotate/Script.py b/LogRotate/Script.py index 74ca058..1cc4174 100755 --- a/LogRotate/Script.py +++ b/LogRotate/Script.py @@ -184,7 +184,12 @@ class LogRotateScript(object): ''' return self._name - name = property(_get_name, None, None, "Name of the script as an identifier") + name = property( + _get_name, + None, + None, + "Name of the script as an identifier" + ) #------------------------------------------------------------ # Property 'cmd' @@ -237,10 +242,11 @@ class LogRotateScript(object): raise LogRotateScriptError(msg) post_files = property( - _get_post_files, - _set_post_files, - None, - "Number of logfiles referencing to this script as a postrotate script." + _get_post_files, + _set_post_files, + None, + "Number of logfiles referencing to this script " + + "as a postrotate script." ) #------------------------------------------------------------ @@ -263,10 +269,11 @@ class LogRotateScript(object): raise LogRotateScriptError(msg) last_files = property( - _get_last_files, - _set_last_files, - None, - "Number of logfiles referencing to this script as a lastaction script." + _get_last_files, + _set_last_files, + None, + "Number of logfiles referencing to this script " + + "as a lastaction script." ) #------------------------------------------------------------ @@ -284,10 +291,10 @@ class LogRotateScript(object): self._done_firstrun = bool(value) done_firstrun = property( - _get_done_firstrun, - _set_done_firstrun, - None, - "Flag, whether the script was executed as a firstaction script." + _get_done_firstrun, + _set_done_firstrun, + None, + "Flag, whether the script was executed as a firstaction script." ) #------------------------------------------------------------ @@ -305,10 +312,10 @@ class LogRotateScript(object): self._done_prerun = bool(value) done_prerun = property( - _get_done_prerun, - _set_done_prerun, - None, - "Flag, whether the script was executed as a prerun script." + _get_done_prerun, + _set_done_prerun, + None, + "Flag, whether the script was executed as a prerun script." ) #------------------------------------------------------------ @@ -326,10 +333,10 @@ class LogRotateScript(object): self._done_postrun = bool(value) done_postrun = property( - _get_done_postrun, - _set_done_postrun, - None, - "Flag, whether the script was executed as a postrun script." + _get_done_postrun, + _set_done_postrun, + None, + "Flag, whether the script was executed as a postrun script." ) #------------------------------------------------------------ @@ -347,10 +354,10 @@ class LogRotateScript(object): self._done_lastrun = bool(value) done_lastrun = property( - _get_done_lastrun, - _set_done_lastrun, - None, - "Flag, whether the script was executed as a lastaction script." + _get_done_lastrun, + _set_done_lastrun, + None, + "Flag, whether the script was executed as a lastaction script." ) #------------------------------------------------------------ @@ -368,10 +375,10 @@ class LogRotateScript(object): self._do_post = bool(value) do_post = property( - _get_do_post, - _set_do_post, - None, - "Flag, whether the script should be executed as a postrun script." + _get_do_post, + _set_do_post, + None, + "Flag, whether the script should be executed as a postrun script." ) #------------------------------------------------------------ @@ -389,10 +396,11 @@ class LogRotateScript(object): self._do_last = bool(value) do_last = property( - _get_do_last, - _set_do_last, - None, - "Flag, whether the script should be executed as a lastaction script." + _get_do_last, + _set_do_last, + None, + "Flag, whether the script should be executed " + + "as a lastaction script." ) #------------------------------------------------------------ @@ -408,7 +416,8 @@ class LogRotateScript(object): _ = self.t.lgettext if self.verbose > 2: - msg = _("Logrotate script object '%s' will destroyed.") % (self.name) + msg = (_("Logrotate script object '%s' will destroyed.") + % (self.name)) self.logger.debug(msg) self.check_for_execute() @@ -485,12 +494,13 @@ class LogRotateScript(object): _ = self.t.lgettext cmd = self.cmd if cmd is None: - msg = _("No command to execute defined in script '%s'.") % (self.name) + msg = (_("No command to execute defined in script '%s'.") % + (self.name)) raise LogRotateScriptError(msg) return False if self.verbose > 3: - msg = _("Executing script '%(name)s' with command: '%(cmd)s'") \ - % {'name': self.name, 'cmd': cmd} + msg = (_("Executing script '%(name)s' with command: '%(cmd)s'") % + {'name': self.name, 'cmd': cmd}) self.logger.debug(msg) if not force: if self.test_mode: @@ -498,20 +508,22 @@ class LogRotateScript(object): try: retcode = subprocess.call(command, shell=True) if self.verbose > 3: - msg = _("Got returncode for script '%(name)s': '%(retcode)s'") \ - % {'name': self.name, 'retcode': retcode} + msg = (_("Got returncode for script '%(name)s': " + + "'%(retcode)s'") % + {'name': self.name, 'retcode': retcode}) self.logger.debug(msg) if retcode < 0: - msg = _("Child in script '%(name)s' was terminated by signal %(retcode)d.") \ - % {'name': self.name, 'retcode': -retcode} + msg = (_("Child in script '%(name)s' was terminated " + + "by signal %(retcode)d.") % + {'name': self.name, 'retcode': -retcode}) self.logger.error(msg) return False if retcode != expected_retcode: return False return True except OSError, e: - msg = _("Execution of script '%(name)s' failed: %(error)s") \ - % {'name': self.name, 'error': str(e)} + msg = (_("Execution of script '%(name)s' failed: %(error)s") % + {'name': self.name, 'error': str(e)}) self.logger.error(msg) return False @@ -534,11 +546,15 @@ class LogRotateScript(object): ''' _ = self.t.lgettext - msg = _("Checking, whether the script '%s' should be executed.") % (self.name) + msg = (_("Checking, whether the script '%s' should be executed.") % + (self.name)) self.logger.debug(msg) if self.do_post or self.do_last: - result = self.execute(force=force, expected_retcode=expected_retcode) + result = self.execute( + force=force, + expected_retcode=expected_retcode + ) self.do_post = False self.do_last = False return result diff --git a/LogRotate/StatusFile.py b/LogRotate/StatusFile.py index 5c2abb3..3afa01c 100755 --- a/LogRotate/StatusFile.py +++ b/LogRotate/StatusFile.py @@ -257,8 +257,8 @@ class LogrotateStatusFile(object): date_utc = rotate_date.astimezone(utc) _ = self.t.lgettext - msg = _("Setting rotation date of '%(file)s' to '%(date)s' ...") \ - % {'file': logfile, 'date': date_utc.isoformat(' ') } + msg = (_("Setting rotation date of '%(file)s' to '%(date)s' ...") % + {'file': logfile, 'date': date_utc.isoformat(' ') }) self.logger.debug(msg) #self.read(must_exists = False) @@ -297,8 +297,8 @@ class LogrotateStatusFile(object): # Big try block for ensure closing open status file try: - msg = _("Open status file '%s' for writing ...") \ - % (self.file_name) + msg = (_("Open status file '%s' for writing ...") % + (self.file_name)) self.logger.debug(msg) # open status file for writing @@ -306,8 +306,8 @@ class LogrotateStatusFile(object): try: fd = open(self.file_name, 'w') except IOError, e: - msg = _("Could not open status file '%s' for write: ") \ - % (self.file_name) + str(e) + msg = (_("Could not open status file '%s' for write: ") % + (self.file_name) + str(e)) raise LogrotateStatusFileError(msg) # write logrotate version line diff --git a/po/de/LC_MESSAGES/pylogrotate.po b/po/de/LC_MESSAGES/pylogrotate.po index 3b77216..664fc83 100644 --- a/po/de/LC_MESSAGES/pylogrotate.po +++ b/po/de/LC_MESSAGES/pylogrotate.po @@ -7,12 +7,13 @@ # $Id$ # $URL$ # +# msgid "" msgstr "" "Project-Id-Version: pylogrotate 0.6.0\n" "Report-Msgid-Bugs-To: frank@brehm-online.com\n" -"POT-Creation-Date: 2011-07-15 11:51+0200\n" -"PO-Revision-Date: 2011-07-15 10:05+0200\n" +"POT-Creation-Date: 2011-07-15 13:16+0200\n" +"PO-Revision-Date: 2011-07-15 13:25+0200\n" "Last-Translator: Frank Brehm \n" "Language-Team: de \n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" @@ -86,12 +87,12 @@ msgstr "Argumente" msgid "Called with '%s'." msgstr "Aufgerufen mit »%s«." -#: LogRotate/Handler.py:1805 +#: LogRotate/Handler.py:1904 #, python-format msgid "Check, whether logfile '%s' should rotated." msgstr "Überprüfe, ob die Logdatei »%s« rotiert werden muß." -#: LogRotate/Handler.py:1197 +#: LogRotate/Handler.py:1244 #, python-format msgid "Checking file '%s' for deleting ..." msgstr "Überprüfe Datei »%s« für Löschen ..." @@ -136,12 +137,12 @@ msgstr "Überprüfe Rechte auf übergeordnetes Verzeichnis »%s« ..." msgid "Checking permissions of status file '%s' ..." msgstr "Überprüfe Rechte auf Statusdatei »%s« ..." -#: LogRotate/Script.py:537 +#: LogRotate/Script.py:549 #, python-format msgid "Checking, whether the script '%s' should be executed." msgstr "Überprüfe, ob das Skript »%s« noch ausgeführt werden muß." -#: LogRotate/Getopts.py:231 +#: LogRotate/Getopts.py:233 msgid "" "Checks only the given configuration file and does nothing. Conflicts with" " -f." @@ -149,17 +150,17 @@ msgstr "" "Überprüft nur die gegebene Konfigurationsdatei und führt nichts aus. " "Beißt sich mit -f." -#: LogRotate/Script.py:505 +#: LogRotate/Script.py:516 #, python-format msgid "Child in script '%(name)s' was terminated by signal %(retcode)d." msgstr "Kindprozeß in Skript »%(name)s« wurde durch Signal %(retcode)d beendet." -#: LogRotate/Handler.py:1769 +#: LogRotate/Handler.py:1868 #, python-format msgid "Child was terminated by signal %d." msgstr "Kindprozess wurde durch Signal %d beendet." -#: LogRotate/Getopts.py:259 +#: LogRotate/Getopts.py:262 msgid "" "Command to send mail (instead of using SMTP or the predefined sendmail " "command)." @@ -167,7 +168,7 @@ msgstr "" "Befehl zum Mailversand (anstelle der Verwendung von SMTP oder des " "vordefinierten sendmail-Befehls)" -#: LogRotate/Getopts.py:271 +#: LogRotate/Getopts.py:275 msgid "Common options" msgstr "Allgemeine Optionen" @@ -176,40 +177,40 @@ msgstr "Allgemeine Optionen" msgid "Compress command '%s' not found." msgstr "Das Komprimierungskommando »%s« wurde nicht gefunden." -#: LogRotate/Handler.py:2024 +#: LogRotate/Handler.py:2143 #, python-format msgid "Compress options: '%s'." msgstr "Komprimierungsoptionen: »%s«." -#: LogRotate/Handler.py:1954 +#: LogRotate/Handler.py:2064 #, python-format msgid "Compressing file '%(file)s' to '%(target)s' with '%(cmd)s' ..." msgstr "Komprimiere Datei »%(file)s« zu »%(target)s« mit »%(cmd)s« ..." -#: LogRotate/Handler.py:2216 LogRotate/Handler.py:2283 -#: LogRotate/Handler.py:2358 +#: LogRotate/Handler.py:2112 #, python-format msgid "" -"Compressing source '%(source)s' to target '%(target)s' with module " -"'%(module)s'." +"Compressing source '%(source)s' to target '%(target)s' with command " +"'%(cmd)s'." msgstr "" -"Komprimiere Quelldatei »%(source)s« zu Zieldatei »%(target)s« mit Modul " -"»%(module)s«." +"Komprimiere Quelldatei »%(source)s« zu Zieldatei »%(target)s« mit " +"Kommando »%(cmd)s«." -#: LogRotate/Handler.py:1996 +#: LogRotate/Handler.py:2341 LogRotate/Handler.py:2408 +#: LogRotate/Handler.py:2483 #, python-format msgid "" -"Compressing source '%(source)s' to target'%(target)s' with command " -"'%(cmd)s'." +"Compressing source '%(source)s' to target '%(target)s' with module " +"'%(module)s'." msgstr "" -"Komprimiere Quelldatei »%(source)s« zu Zieldatei »%(target)s« mit " -"Kommando »%(cmd)s«." +"Komprimiere Quelldatei »%(source)s« zu Zieldatei »%(target)s« mit Modul " +"»%(module)s«." -#: LogRotate/Handler.py:1910 +#: LogRotate/Handler.py:2016 msgid "Compression of all uncompressed logfiles ..." msgstr "Komprimierung aller unkomprimierten Logdateien ..." -#: LogRotate/Handler.py:1124 +#: LogRotate/Handler.py:1168 #, python-format msgid "Compression of file '%s' will be delayed." msgstr "Die Komprimierung der Datei »%s« wird verschoben." @@ -222,21 +223,21 @@ msgstr "Nur Überprüfung der Konfiguration." msgid "Configuration reader object structure" msgstr "Objektstruktur des Konfigurtionslesers" -#: LogRotate/Handler.py:2107 +#: LogRotate/Handler.py:2229 #, python-format msgid "Copying all file metadata to target '%s' ..." msgstr "Kopiere alle Datei-Metadaten zu Zielobjekt »%s« ..." -#: LogRotate/Handler.py:931 +#: LogRotate/Handler.py:943 #, python-format msgid "Copying file '%(from)s' => '%(to)s'." msgstr "Kopiere Datei »%(from)s« => »%(to)s«." -#: LogRotate/Handler.py:2174 +#: LogRotate/Handler.py:2299 msgid "Copying ownership from source to target." msgstr "Kopiere Besitzerschaft von Quell- zu Zielobjekt." -#: LogRotate/Handler.py:2123 +#: LogRotate/Handler.py:2245 #, python-format msgid "" "Copying permissions and timestamps from source '%(src)s' to target " @@ -289,75 +290,75 @@ msgstr "Konnte keinen Präfix in »%s« ermitteln." msgid "Couldn't open PID file '%(file)s' for reading: %(msg)s" msgstr "Konnte PID-Datei »%(file)s« nicht zum Lesen öffnen: %(msg)s" -#: LogRotate/Handler.py:659 +#: LogRotate/Handler.py:661 #, python-format msgid "Couldn't open PID file '%(file)s' for writing: %(msg)s" msgstr "Konnte PID-Datei »%(file)s« nicht zum Schreiben öffnen: %(msg)s" -#: LogRotate/Handler.py:1702 +#: LogRotate/Handler.py:1796 #, python-format msgid "Create permissions: %(mode)4o, Owner-UID: %(uid)d, Group-GID: %(gid)d" msgstr "Erstellungsrechte: %(mode)4o, Besitzer-UID: %(uid)d, Besitzer-GID: %(gid)d" -#: LogRotate/Handler.py:1690 +#: LogRotate/Handler.py:1784 #, python-format msgid "Creating directory '%s' ..." msgstr "Erstelle Verzeichnis »%s« ..." -#: LogRotate/Handler.py:1660 +#: LogRotate/Handler.py:1752 #, python-format msgid "Creating olddir '%s' recursive ..." msgstr "Erstelle Olddir-Verzeichnis »%s« rekursiv ..." -#: LogRotate/Handler.py:1200 +#: LogRotate/Handler.py:1247 #, python-format msgid "Current count: %(count)d, current age: %(age)d seconds" msgstr "Aktuelle Anzahl: %(count)d, aktuelles Alter: %(age)d Sekunden" -#: LogRotate/Handler.py:1479 +#: LogRotate/Handler.py:1557 #, python-format msgid "Cyclic rotation from '%(from)s' to '%(to)s'." msgstr "Zyklische Rotation von »%(from)s« zu »%(to)s«." -#: LogRotate/Handler.py:1846 +#: LogRotate/Handler.py:1948 #, python-format msgid "Date of last rotation: %s." msgstr "Zeitpunkt der letzten Rotation: %s." -#: LogRotate/Handler.py:1863 +#: LogRotate/Handler.py:1968 #, python-format msgid "Date of next rotation '%(next)s' is in future, rotation not necessary." msgstr "" "Der Zeitpunkt der nächsten Rotation »%(next)s« liegt in der Zukunft, eine" " Rotation ist deshalb nicht notwendig." -#: LogRotate/Handler.py:1850 +#: LogRotate/Handler.py:1953 #, python-format msgid "Date of next rotation: %s." msgstr "Zeitpunkt der nächsten Rotation: %s." -#: LogRotate/Handler.py:1208 +#: LogRotate/Handler.py:1256 #, python-format msgid "Deleting '%s' because of too much." msgstr "Lösche Datei »%s«, weil: zuviel." -#: LogRotate/Handler.py:1217 +#: LogRotate/Handler.py:1266 #, python-format msgid "Deleting '%s' because of too old." msgstr "Lösche Datei »%s«, weil: zu alt." -#: LogRotate/Handler.py:1888 +#: LogRotate/Handler.py:1994 #, python-format msgid "Deleting file '%s' ..." msgstr "Lösche Datei »%s« ..." -#: LogRotate/Handler.py:2047 LogRotate/Handler.py:2248 -#: LogRotate/Handler.py:2323 LogRotate/Handler.py:2398 +#: LogRotate/Handler.py:2166 LogRotate/Handler.py:2373 +#: LogRotate/Handler.py:2448 LogRotate/Handler.py:2523 #, python-format msgid "Deleting uncompressed file '%s' ..." msgstr "Lösche unkomprimierte Datei »%s« ..." -#: LogRotate/Handler.py:1880 +#: LogRotate/Handler.py:1986 msgid "Deletion of all superfluid logfiles ..." msgstr "Löschen aller überflüssigen Logdateien ..." @@ -366,7 +367,7 @@ msgstr "Löschen aller überflüssigen Logdateien ..." msgid "Directive '%s' is not allowed outside of a logfile definition." msgstr "Die Direktive »%s« ist nicht außerhalb einer Logdateidefinition erlaubt." -#: LogRotate/Handler.py:1679 +#: LogRotate/Handler.py:1771 #, python-format msgid "Directory '%s' allready exists, not created." msgstr "Verzeichnis »%s« existiert bereits und wird nicht angelegt." @@ -376,28 +377,28 @@ msgstr "Verzeichnis »%s« existiert bereits und wird nicht angelegt." msgid "Directory '%s' doesn't exists." msgstr "Verzeichnis »%s« existiert nicht." -#: LogRotate/Handler.py:1687 +#: LogRotate/Handler.py:1780 #, python-format msgid "Directory '%s' exists, but is not a valid directory." msgstr "" "Das Verzeichnis »%s« existiert bereits, ist aber kein gültiges " "Verzeichnis." -#: LogRotate/Handler.py:1656 +#: LogRotate/Handler.py:1748 #, python-format msgid "Directory chain to create: '%s'." msgstr "Verzeichniskette zum Erstellen: »%s«." -#: LogRotate/Getopts.py:284 +#: LogRotate/Getopts.py:288 msgid "Display brief usage message and exit." msgstr "Zeigt einen kurzen Text zur Verwendung und beendet sich." -#: LogRotate/Handler.py:892 +#: LogRotate/Handler.py:901 #, python-format msgid "Do rotate logfile '%s' ..." msgstr "Rotiere Logdatei »%s« ..." -#: LogRotate/Getopts.py:211 +#: LogRotate/Getopts.py:213 msgid "Don't do anything, just test (implies -v and -T)" msgstr "Testmodus, Kommandos werden nur simuliert (beinhaltet -v und -T)" @@ -405,65 +406,65 @@ msgstr "Testmodus, Kommandos werden nur simuliert (beinhaltet -v und -T)" msgid "End of a logfile definition." msgstr "Ende einer Logdateidefinition." -#: LogRotate/Handler.py:1015 LogRotate/Handler.py:2161 +#: LogRotate/Handler.py:1036 LogRotate/Handler.py:2286 #, python-format msgid "Error on chmod of '%(target)s': %(err)s" msgstr "Fehler beim Setzen der Rechte von »%(target)s«: %(err)s" -#: LogRotate/Handler.py:1036 LogRotate/Handler.py:2189 +#: LogRotate/Handler.py:1061 LogRotate/Handler.py:2314 #, python-format msgid "Error on chown of '%(file)s': %(err)s" msgstr "Fehler beim Setzen der Besitzerschaft von »%(file)s«: %(err)s" -#: LogRotate/Handler.py:1731 +#: LogRotate/Handler.py:1829 #, python-format msgid "Error on chowning directory '%(dir)s': %(err)s" msgstr "Fehler beim Ändern der Besitzrechte von Verzeichnis »%(dir)s«: %(err)s" -#: LogRotate/Handler.py:938 +#: LogRotate/Handler.py:950 #, python-format msgid "Error on copying '%(from)s' => '%(to)s': %(err)s" msgstr "Fehler beim Kopieren von »%(from)s« => »%(to)s«: %(err)s" -#: LogRotate/Handler.py:1712 +#: LogRotate/Handler.py:1809 #, python-format msgid "Error on creating directory '%(dir)s': %(err)s" msgstr "Fehler beim Erstellen von Verzeichnis »%(dir)s«: %(err)s" -#: LogRotate/Handler.py:984 +#: LogRotate/Handler.py:1003 #, python-format msgid "Error on creating file '%(from)s': %(err)s" msgstr "Fehler beim Erstellen der Datei »%(from)s«: %(err)s" -#: LogRotate/Handler.py:915 LogRotate/Handler.py:969 +#: LogRotate/Handler.py:924 LogRotate/Handler.py:985 #, python-format msgid "Error on moving '%(from)s' => '%(to)s': %(err)s" msgstr "" "Fehler beim Umbenennen bzw. Verschieben von »%(from)s« => »%(to)s«: " "%(err)s" -#: LogRotate/Handler.py:2297 LogRotate/Handler.py:2372 +#: LogRotate/Handler.py:2422 LogRotate/Handler.py:2497 #, python-format msgid "Error on open file '%(file)s' on reading: %(err)s" msgstr "Fehler beim Öffnen der Datei »%(file)s« zum Schreiben: %(err)s" -#: LogRotate/Handler.py:2235 LogRotate/Handler.py:2307 -#: LogRotate/Handler.py:2382 +#: LogRotate/Handler.py:2360 LogRotate/Handler.py:2432 +#: LogRotate/Handler.py:2507 #, python-format msgid "Error on open file '%(file)s' on writing: %(err)s" msgstr "Fehler beim Öffnen der Datei »%(file)s« zum Schreiben: %(err)s" -#: LogRotate/Handler.py:1894 +#: LogRotate/Handler.py:2000 #, python-format msgid "Error on removing file '%(file)s': %(err)s" msgstr "Fehler beim Löschen der Datei »%(file)s«: %(err)s" -#: LogRotate/Handler.py:2145 +#: LogRotate/Handler.py:2268 #, python-format msgid "Error on setting times on target file '%(target)s': %(err)s" msgstr "Fehler beim Setzen der Zeitstempel von Zielojekt »%(target)s«: %(err)s" -#: LogRotate/Handler.py:950 +#: LogRotate/Handler.py:965 #, python-format msgid "Error on truncing file '%(from)s': %(err)s" msgstr "Fehler beim Abschneiden der Datei »%(from)s«: %(err)s" @@ -473,48 +474,48 @@ msgstr "Fehler beim Abschneiden der Datei »%(from)s«: %(err)s" msgid "Error removing PID file '%(file)s': %(msg)" msgstr "Fehler beim Löschen der PID-Datei »%(file)s«: %(msg)" -#: LogRotate/Handler.py:2054 LogRotate/Handler.py:2255 -#: LogRotate/Handler.py:2330 LogRotate/Handler.py:2405 +#: LogRotate/Handler.py:2173 LogRotate/Handler.py:2380 +#: LogRotate/Handler.py:2455 LogRotate/Handler.py:2530 #, python-format msgid "Error removing uncompressed file '%(file)s': %(msg)" msgstr "Fehler beim Löschen der unkomprimierten Datei »%(file)s«: %(msg)" -#: LogRotate/Handler.py:1758 +#: LogRotate/Handler.py:1857 #, python-format msgid "Executing command: '%s'." msgstr "Führe Kommando aus: »%s«." -#: LogRotate/Handler.py:788 +#: LogRotate/Handler.py:792 #, python-format msgid "Executing firstaction script '%s' ..." msgstr "Führe Firstaction-Skript »%s« aus ..." -#: LogRotate/Handler.py:855 +#: LogRotate/Handler.py:864 #, python-format msgid "Executing lastaction script '%s' ..." msgstr "Führe Lastaction-Skript »%s« aus ..." -#: LogRotate/Handler.py:834 +#: LogRotate/Handler.py:842 #, python-format msgid "Executing postrun script '%s' ..." msgstr "Führe Postrun-Skript »%s« aus ..." -#: LogRotate/Handler.py:806 +#: LogRotate/Handler.py:813 #, python-format msgid "Executing prerun script '%s' ..." msgstr "Führe Prerun-Skript »%s« aus ..." -#: LogRotate/Script.py:492 +#: LogRotate/Script.py:502 #, python-format msgid "Executing script '%(name)s' with command: '%(cmd)s'" msgstr "Führe Skript »%(name)s« mit dem Kommando »%(cmd)s« aus." -#: LogRotate/Handler.py:1776 +#: LogRotate/Handler.py:1875 #, python-format msgid "Execution failed: %s" msgstr "Ausführung ging schief: %s" -#: LogRotate/Script.py:513 +#: LogRotate/Script.py:525 #, python-format msgid "Execution of script '%(name)s' failed: %(error)s" msgstr "Die Ausführung des Skriptes »%(name)s« ging schief: %(error)s" @@ -523,44 +524,44 @@ msgstr "Die Ausführung des Skriptes »%(name)s« ging schief: %(error)s" msgid "Failing size definition." msgstr "Fehlende Größenangabe." -#: LogRotate/Config.py:694 LogRotate/Config.py:721 LogRotate/Mailer.py:496 +#: LogRotate/Config.py:694 LogRotate/Config.py:721 LogRotate/Mailer.py:523 #, python-format msgid "File '%s' doesn't exists." msgstr "Die Datei »%s« existiert nicht." -#: LogRotate/Handler.py:1949 +#: LogRotate/Handler.py:2058 #, python-format msgid "File '%s' has a size of 0, skip compressing." msgstr "Die Datei »%s« hat die Größe Null, übergehe Komprimierung." -#: LogRotate/Mailer.py:501 +#: LogRotate/Mailer.py:528 #, python-format msgid "File '%s' is not a regular file." msgstr "Die Datei »%s« ist keine reguläre Datei." -#: LogRotate/Handler.py:1112 +#: LogRotate/Handler.py:1154 #, python-format msgid "File '%s' seems to be compressed, skip it." msgstr "Datei »%s« scheint schon komprimiert zu sein, übergehe sie." -#: LogRotate/Handler.py:1118 +#: LogRotate/Handler.py:1161 #, python-format msgid "File '%s' will be deleted, compression unnecessary." msgstr "Die Datei »%s« wird gelöscht, keine Komprimierung notwendig." -#: LogRotate/Handler.py:2097 LogRotate/Handler.py:2115 +#: LogRotate/Handler.py:2219 LogRotate/Handler.py:2237 #, python-format msgid "File or directory '%s' doesn't exists." msgstr "Die Datei oder das Verzeichnis »%s« existiert nicht." -#: LogRotate/Handler.py:1855 +#: LogRotate/Handler.py:1959 #, python-format msgid "Filesize %(filesize)d is less than %(maxsize)d, rotation not necessary." msgstr "" "Die Dateigröße %(filesize)d ist geringer als %(maxsize)d, eine Rotation " "ist deshalb nicht notwendig." -#: LogRotate/Handler.py:1824 +#: LogRotate/Handler.py:1924 #, python-format msgid "Filesize of '%(file)s': %(size)d." msgstr "Dateigröße von »%(file)s«: %(size)d." @@ -570,7 +571,7 @@ msgstr "Dateigröße von »%(file)s«: %(size)d." msgid "Find all logfiles for shell matching pattern '%s' ..." msgstr "Finde alle Logdateien für das Shell-Suchmuster »%s« ..." -#: LogRotate/Getopts.py:221 +#: LogRotate/Getopts.py:223 msgid "Force file rotation" msgstr "Erzwingt Logratation" @@ -631,15 +632,15 @@ msgstr "Logdatei »%(file)s« zum Suchmuster »%(pattern)s« gefunden." msgid "Found logfile '%(file)s' with rotation date '%(date)s'." msgstr "Logdateidefinition für »%(file)s« mit Zeitpunkt »%(date)s« gefunden." -#: LogRotate/Handler.py:1134 +#: LogRotate/Handler.py:1179 msgid "Found logfiles to compress:" msgstr "Gefundene Logdateien für Komprimierung:" -#: LogRotate/Handler.py:1224 +#: LogRotate/Handler.py:1274 msgid "Found logfiles to delete:" msgstr "Gefundene Logdateien zum Löschen:" -#: LogRotate/Handler.py:1379 +#: LogRotate/Handler.py:1449 msgid "Found old logfiles:" msgstr "Gefundene alte Logdateien:" @@ -648,7 +649,7 @@ msgstr "Gefundene alte Logdateien:" msgid "Found option '%(opt)s' with value '%(val)s'." msgstr "Option »%(opt)s« mit Wert »%(val)s« gefunden." -#: LogRotate/Handler.py:1496 +#: LogRotate/Handler.py:1575 msgid "Found rotations:" msgstr "Gefundene Rotationen:" @@ -672,7 +673,7 @@ msgstr "" "Wert »%(value)s« nach boolscher Option »%(option)s« gefunden, wird " "ignoriert." -#: LogRotate/Mailer.py:571 +#: LogRotate/Mailer.py:619 msgid "Generated E-mail:" msgstr "Generierte E-Mail:" @@ -697,17 +698,17 @@ msgstr "Erhaltene Rotationsgröße in »%(directive)s«: %(bytes)d Bytes." msgid "Got mail address pair:" msgstr "Mailadress-Paar gefunden:" -#: LogRotate/Script.py:501 +#: LogRotate/Script.py:511 #, python-format msgid "Got returncode for script '%(name)s': '%(retcode)s'" msgstr "Habe Rückggabewert »%(retcode)s« für Skript »%(name)s« erhalten." -#: LogRotate/Handler.py:1766 +#: LogRotate/Handler.py:1865 #, python-format msgid "Got returncode: '%s'." msgstr "Erhaltener Rückgabewert: »%s«." -#: LogRotate/Mailer.py:539 +#: LogRotate/Mailer.py:582 #, python-format msgid "Guessed content-type: '%(ctype)s' and encoding '%(encoding)s'." msgstr "Erratener Content-Type: »%(ctype)s«, und Encoding: »%(encoding)s«." @@ -748,7 +749,7 @@ msgstr "" msgid "Incompatible version of status file '%(file)s': %(header)s" msgstr "Inkompatible Version der Statusdatei »%(file)s«: %(header)s" -#: LogRotate/Mailer.py:433 +#: LogRotate/Mailer.py:459 msgid "Initial search for the sendmail executable ..." msgstr "Initiale Suche nach dem »sendmail«-Programm ..." @@ -817,11 +818,11 @@ msgstr "Ungültige Angabe einer Rotationsperiode: »%s«." msgid "Invalid taboo pattern type '%s' given." msgstr "Ungültiger Tabutyp »%s« angegeben." -#: LogRotate/Getopts.py:324 +#: LogRotate/Getopts.py:328 msgid "Invalid usage of --force and --config-check." msgstr "Ungültige Verwendung von --force und --config-check." -#: LogRotate/Script.py:236 LogRotate/Script.py:262 +#: LogRotate/Script.py:241 LogRotate/Script.py:268 #, python-format msgid "Invalid value for property '%s' given." msgstr "Ungültiger Wert für Eigenschaft »%s« übergeben." @@ -850,31 +851,31 @@ msgstr "" "Die Logdatei »%(logfile)s« wurde bereits definiert (Datei »%(cfgfile)s«, " "Zeile %(rownum)d) und wird damit nicht noch einmal berücksichtigt." -#: LogRotate/Handler.py:742 +#: LogRotate/Handler.py:745 #, python-format msgid "Logfile '%s' WILL rotated." msgstr "Die Logdatei »%s« wird NICHT rotiert." -#: LogRotate/Handler.py:1809 +#: LogRotate/Handler.py:1908 #, python-format msgid "Logfile '%s' doesn't exists, not rotated." msgstr "Die Logdatei »%s« existiert nicht und wird demzufolge auch nicht rotiert." -#: LogRotate/Handler.py:1830 +#: LogRotate/Handler.py:1931 #, python-format msgid "Logfile '%s' has a filesize of Zero, not rotated." msgstr "" "Die Logdatei »%s« hate eine Dateigröße von Null und wird deshalb auch " "nicht rotiert." -#: LogRotate/Handler.py:1818 +#: LogRotate/Handler.py:1917 #, python-format msgid "Logfile '%s' is not a regular file, not rotated." msgstr "" "Die Logdatei »%s« ist keine reguläre Datei und wird deshalb auch nicht " "rotiert." -#: LogRotate/Handler.py:744 +#: LogRotate/Handler.py:747 #, python-format msgid "Logfile '%s' will NOT rotated." msgstr "Die Logdatei »%s« wird NICHT rotiert." @@ -894,7 +895,7 @@ msgstr "" msgid "Logrotate config reader initialised." msgstr "Logrotate-Konfigurationsleser initialisiert." -#: LogRotate/Script.py:411 +#: LogRotate/Script.py:419 #, python-format msgid "Logrotate script object '%s' will destroyed." msgstr "Das Logrotate-Script-Objekt »%s« wird zerstört." @@ -907,37 +908,37 @@ msgstr "Logrotation initialisiert." msgid "Logrotating ready for work." msgstr "Logrotation ist bereit zur Arbeit." -#: LogRotate/Handler.py:785 +#: LogRotate/Handler.py:788 msgid "Looking, whether the firstaction script should be executed." msgstr "Schaue nach, ob das Firstaction-Skript ausgeführt werden soll." -#: LogRotate/Handler.py:843 +#: LogRotate/Handler.py:851 msgid "Looking, whether the lastaction script should be executed." msgstr "Schaue nach, ob das Lastaction-Skript ausgeführt werden soll." -#: LogRotate/Handler.py:822 +#: LogRotate/Handler.py:829 msgid "Looking, whether the postrun script should be executed." msgstr "Schaue nach, ob das Postrun-Skript ausgeführt werden soll." -#: LogRotate/Handler.py:797 +#: LogRotate/Handler.py:803 msgid "Looking, whether the prerun script should be executed." msgstr "Schaue nach, ob das Prerun-Skript ausgeführt werden soll." -#: LogRotate/Mailer.py:359 +#: LogRotate/Mailer.py:385 msgid "Mailer object will destroyed." msgstr "Das Mailer-Objekt wird zerstört." -#: LogRotate/Handler.py:1189 +#: LogRotate/Handler.py:1236 #, python-format msgid "Max. count rotations: %d" msgstr "Maximale Anzahl von Rotationen: %d" -#: LogRotate/Handler.py:1181 +#: LogRotate/Handler.py:1228 #, python-format msgid "Maxage: %d seconds" msgstr "Maximalalter: %d Sekunden" -#: LogRotate/Handler.py:908 LogRotate/Handler.py:958 +#: LogRotate/Handler.py:917 LogRotate/Handler.py:974 #, python-format msgid "Moving file '%(from)s' => '%(to)s'." msgstr "Benenne bzw. verschiebe Datei »%(from)s« => »%(to)s«." @@ -957,7 +958,7 @@ msgstr "Nutzloser Inhalt am Ende einer Logdateidefinition gefunden: »%s«." msgid "Negative value %(value)s for option '%(option)s' is not allowed." msgstr "Der negative Wert %(value)s für die Option »%(option)s« ist nicht erlaubt." -#: LogRotate/Handler.py:2092 +#: LogRotate/Handler.py:2213 msgid "" "Neither 'target' nor 'statinfo' was given on calling " "_copy_file_metadata()." @@ -993,24 +994,24 @@ msgstr "Neue Logdateidefinition:" msgid "New taboo pattern: '%s'." msgstr "Neues Tabu-Muster: »%s«." -#: LogRotate/Script.py:488 +#: LogRotate/Script.py:497 #, python-format msgid "No command to execute defined in script '%s'." msgstr "Kein Kommando zu Ausführung in Skript »%s« definiert." -#: LogRotate/Handler.py:1092 +#: LogRotate/Handler.py:1132 msgid "No compression defined." msgstr "Keine Komprimierung definiert." -#: LogRotate/Getopts.py:328 +#: LogRotate/Getopts.py:332 msgid "No configuration file given." msgstr "Keine Konfigurationsdatei angegeben." -#: LogRotate/Handler.py:1577 +#: LogRotate/Handler.py:1659 msgid "No dirname directive for olddir given." msgstr "Kein Verzeichnis für olddir-Direktive angegeben." -#: LogRotate/Mailer.py:269 LogRotate/Mailer.py:450 +#: LogRotate/Mailer.py:274 LogRotate/Mailer.py:476 #, python-format msgid "No execute permissions to '%s'." msgstr "Keinw Ausführungsrechte auf »%s«." @@ -1028,7 +1029,7 @@ msgstr "" msgid "No file or directory given in a include directive." msgstr "Keine Datei oder Verzeichnis in »include«-Direktive angegeben." -#: LogRotate/Handler.py:678 +#: LogRotate/Handler.py:681 msgid "No logfile definitions found." msgstr "Keine Logdatei-Definitionen gefunden." @@ -1045,31 +1046,31 @@ msgstr "Kein Logdateimuster am Beginn einer Logdateidefinition angegeben." msgid "No logfile pattern defined." msgstr "Keine Logdatei bzw. Dateisuchmuster definiert." -#: LogRotate/Handler.py:1914 +#: LogRotate/Handler.py:2020 msgid "No logfiles to compress found." msgstr "Keine Logdateien zum Komprimieren gefunden." -#: LogRotate/Handler.py:1884 +#: LogRotate/Handler.py:1990 msgid "No logfiles to delete found." msgstr "Keine Logdateien zum Löschen gefunden." -#: LogRotate/Handler.py:1176 +#: LogRotate/Handler.py:1223 msgid "No maxage given." msgstr "Kein Maximalalter angegeben." -#: LogRotate/Handler.py:1098 LogRotate/Handler.py:1168 +#: LogRotate/Handler.py:1138 LogRotate/Handler.py:1215 msgid "No old logfiles available." msgstr "Keine alten Logdateien ermittelt." -#: LogRotate/Handler.py:1137 +#: LogRotate/Handler.py:1183 msgid "No old logfiles to compress found." msgstr "Keine alten Logdateien für Komprimierung gefunden." -#: LogRotate/Handler.py:1227 +#: LogRotate/Handler.py:1278 msgid "No old logfiles to delete found." msgstr "Keine Logdateien zum Löschen gefunden." -#: LogRotate/Handler.py:614 +#: LogRotate/Handler.py:616 #, python-format msgid "No permission to signal the process %d ..." msgstr "Kein Recht, ein Signal an Prozeß %d zu senden ..." @@ -1078,7 +1079,7 @@ msgstr "Kein Recht, ein Signal an Prozeß %d zu senden ..." msgid "No script name given in a script directive." msgstr "Kein Scriptname in Scriptdirektive angegeben." -#: LogRotate/Handler.py:598 +#: LogRotate/Handler.py:599 #, python-format msgid "No useful information found in PID file '%(file)s': '%(line)s'" msgstr "Keine sinnvolle Information in PID-Datei »%(file)s« gefunden: »%(line)s«" @@ -1095,34 +1096,34 @@ msgstr "" msgid "No write access to status file '%s'." msgstr "Kein Schreibzugriff auf Statusdatei »%s«." -#: LogRotate/Handler.py:1639 +#: LogRotate/Handler.py:1729 #, python-format msgid "No write and execute access to olddir '%s'." msgstr "Keine Schreib- und Ausführungsrechte auf das Olddir-Verzeichnis »%s«." -#: LogRotate/Handler.py:1634 +#: LogRotate/Handler.py:1723 #, python-format msgid "Olddir '%s' allready exists, not created." msgstr "Das Olddir-Verzeichnis »%s« existiert bereits und wird nicht angelegt." -#: LogRotate/Handler.py:1646 +#: LogRotate/Handler.py:1737 #, python-format msgid "Olddir '%s' exists, but is not a valid directory." msgstr "" "Das Olddir-Verzeichnis »%s« existiert bereits, ist aber kein gültiges " "Verzeichnis." -#: LogRotate/Handler.py:1626 +#: LogRotate/Handler.py:1715 #, python-format msgid "Olddir name is now '%s'." msgstr "Der Olddir-Name ist jetzt »%s«." -#: LogRotate/Mailer.py:277 +#: LogRotate/Mailer.py:282 #, python-format msgid "Only absolute path allowed for a sendmail command: '%s'." msgstr "Für das »sendmail«-Kommando sind nur absolute Pfadangaben erlaubt: »%s«." -#: LogRotate/Getopts.py:332 +#: LogRotate/Getopts.py:336 msgid "Only one configuration file is allowed." msgstr "Es ist nur die Angabe einer Konfigurationsdatei erlaubt." @@ -1142,8 +1143,8 @@ msgstr "" "Nur ein Scriptname in einer Scriptdirektive erlaubt, der erste wird " "verwendet." -#: LogRotate/Handler.py:1023 LogRotate/Handler.py:1719 -#: LogRotate/Handler.py:2178 +#: LogRotate/Handler.py:1045 LogRotate/Handler.py:1816 +#: LogRotate/Handler.py:2303 msgid "Only root may execute chown()." msgstr "Nur root darf Besitzrechte ändern." @@ -1226,11 +1227,11 @@ msgstr "" "Das übergeordnetes Verzeichnis »%(dir)s« der Statusdatei »%(file)s« ist " "kein Verzeichnis." -#: LogRotate/Getopts.py:250 +#: LogRotate/Getopts.py:253 msgid "Path of PID file (different to configuration)" msgstr "Pfad zur PID-Datei (im Unterschied zur Konfiguration)" -#: LogRotate/Getopts.py:241 +#: LogRotate/Getopts.py:244 msgid "Path of state file (different to configuration)" msgstr "Pfad zur Statusdatei (im Unterschied zur Konfiguration)" @@ -1240,7 +1241,7 @@ msgstr "Pfad zur Statusdatei (im Unterschied zur Konfiguration)" msgid "Pattern '%s'." msgstr "Suchmuster »%s«." -#: LogRotate/Handler.py:737 +#: LogRotate/Handler.py:740 #, python-format msgid "Performing logfile '%s' ..." msgstr "Verarbeite Logdatei »%s« ..." @@ -1260,12 +1261,12 @@ msgstr "Die Rechte auf das Verzeichnis »%s« sind okay." msgid "Postrotate script '%s' not found." msgstr "Das Postrotate-Skript »%s« wurde nicht gefunden." -#: LogRotate/Handler.py:610 +#: LogRotate/Handler.py:612 #, python-format msgid "Process with PID %d anonymous died." msgstr "Prozeß mit der PID %d ist unbekannterweise gestorben." -#: LogRotate/Handler.py:622 +#: LogRotate/Handler.py:624 #, python-format msgid "Process with PID %d is allready running." msgstr "Prozeß mit der PID %d läuft noch." @@ -1285,7 +1286,7 @@ msgstr "Lese Konfiguration aus »%s« ..." msgid "Reading status file '%s' ..." msgstr "Lese Statusdatei »%s« ..." -#: LogRotate/Handler.py:977 +#: LogRotate/Handler.py:996 #, python-format msgid "Recreating file '%s'." msgstr "Erstelle Datei »%s«." @@ -1334,12 +1335,12 @@ msgstr "Rest nach Wochenermittlung: »%s«." msgid "Rest after years: '%s'." msgstr "Rest nach Jahresermittlung: »%s«." -#: LogRotate/Handler.py:1469 +#: LogRotate/Handler.py:1546 #, python-format msgid "Resulting target '%s' exists, retrieve cyclic rotation ..." msgstr "Resultierende Zieldatei »%s« existiert, ermittle zyklische Rotation ..." -#: LogRotate/Handler.py:1422 +#: LogRotate/Handler.py:1498 #, python-format msgid "" "Retrieving all movings and rotations for logfile '%(file)s' to target " @@ -1348,20 +1349,20 @@ msgstr "" "Ermittle alle Umbenennungen und Rotationen für Logdatei »%(file)s« zu " "Zieldatei »%(target)s« ..." -#: LogRotate/Handler.py:1257 +#: LogRotate/Handler.py:1312 #, python-format msgid "Retrieving all old logfiles for file '%s' ..." msgstr "Ermittle alle alten Laogdateien zu Datei »%s« ..." -#: LogRotate/Handler.py:1085 +#: LogRotate/Handler.py:1125 msgid "Retrieving logfiles to compress ..." msgstr "Ermittle zu komprimierende Logdateien ..." -#: LogRotate/Handler.py:1161 +#: LogRotate/Handler.py:1208 msgid "Retrieving logfiles to delete ..." msgstr "Ermittle zu löschende Logdateien ..." -#: LogRotate/Handler.py:1524 +#: LogRotate/Handler.py:1603 #, python-format msgid "Retrieving the name of the rotated file of '%s' ..." msgstr "Ermittle den Namen der Rotierten Datei von »%s« ..." @@ -1370,12 +1371,12 @@ msgstr "Ermittle den Namen der Rotierten Datei von »%s« ..." msgid "Rotates, compresses and mails system logs." msgstr "Rotiert, komprimiert und versended Systemlogdateien per Mail." -#: LogRotate/Handler.py:1836 +#: LogRotate/Handler.py:1938 #, python-format msgid "Rotating of '%s' because of force mode." msgstr "Rotation von »%s« wegen Zwangs-Modus." -#: LogRotate/Handler.py:726 +#: LogRotate/Handler.py:729 msgid "Rotating of logfile definition:" msgstr "Rotation der Logdatei-Definition:" @@ -1384,7 +1385,7 @@ msgstr "Rotation der Logdatei-Definition:" msgid "Script name '%s' is allready declared, it will be overwritten." msgstr "Der Scriptname »%s« wurde bereits deklariert und wird überschrieben." -#: LogRotate/Handler.py:1367 +#: LogRotate/Handler.py:1437 #, python-format msgid "Search for pattern '%s' ..." msgstr "Suche nach Muster »%s« ..." @@ -1394,12 +1395,12 @@ msgstr "Suche nach Muster »%s« ..." msgid "Search path '%s' doesn't exists or is not a directory." msgstr "Der Suchpfad »%s« existiert entweder nicht oder ist kein Verzeichnis." -#: LogRotate/Mailer.py:512 +#: LogRotate/Mailer.py:539 #, python-format msgid "Sending mail with attached file '%(file)s' to: %(rcpt)s" msgstr "Verschicke Mail mit angehängter Datei »%(file)s« an: %(rcpt)s" -#: LogRotate/Mailer.py:273 +#: LogRotate/Mailer.py:278 #, python-format msgid "Sendmail command '%s' not found." msgstr "Das »sendmail«-Kommando »%s« wurde nicht gefunden." @@ -1414,11 +1415,11 @@ msgstr "Sinnloser Optionswert »%(value)s« nach »%(option)s«." msgid "Set sender mail address to: '%s'." msgstr "Setze Absender-Mailadresse auf: »%s«." -#: LogRotate/Getopts.py:201 +#: LogRotate/Getopts.py:203 msgid "Set the verbosity level" msgstr "Setzt das Ausführlichkeits-Niveau" -#: LogRotate/Getopts.py:190 +#: LogRotate/Getopts.py:192 msgid "Set this do simulate commands" msgstr "Testmodus, Kommandos werden nur simuliert" @@ -1432,7 +1433,7 @@ msgstr "Setze »%(what)s« in »%(directive)s« auf %(to)f Tage." msgid "Setting '%(what)s' in '%(directive)s' to %(to)s." msgstr "Setze »%(what)s« in »%(directive)s« auf %(to)s." -#: LogRotate/Handler.py:2139 +#: LogRotate/Handler.py:2262 #, python-format msgid "Setting atime and mtime of target '%s'." msgstr "Setze Atime und Mtime von Zielobjekt »%s«." @@ -1462,12 +1463,12 @@ msgstr "Setze Mailadresse in »%(directive)s« auf »%(addr)s«." msgid "Setting mailfirst in '%(directive)s' to '%(value)s'." msgstr "Setze mailfirst in »%(directive)s« auf »%(value)s«." -#: LogRotate/Handler.py:1029 +#: LogRotate/Handler.py:1051 #, python-format msgid "Setting ownership of '%(file)s' to uid %(uid)d and gid %(gid)d." msgstr "Setze Besitzerschaft von »%(file)s« auf UID %(uid)d und GID %(gid)d." -#: LogRotate/Handler.py:1008 LogRotate/Handler.py:2154 +#: LogRotate/Handler.py:1028 LogRotate/Handler.py:2278 #, python-format msgid "Setting permissions of '%(target)s' to %(mode)4o." msgstr "Setze Rechte von »%(target)s« auf %(mode)4o." @@ -1477,11 +1478,11 @@ msgstr "Setze Rechte von »%(target)s« auf %(mode)4o." msgid "Setting rotation date of '%(file)s' to '%(date)s' ..." msgstr "Setze Rotationszeitpunkt von »%(file)s« auf »%(date)s« ..." -#: LogRotate/Getopts.py:273 +#: LogRotate/Getopts.py:277 msgid "Shows a help message and exit." msgstr "Zeigt einen Hilfetext und beendet sich." -#: LogRotate/Getopts.py:293 +#: LogRotate/Getopts.py:297 msgid "Shows the version number of the program and exit." msgstr "Zeigt die Versionsnummer des Programms und beendet sich." @@ -1499,12 +1500,12 @@ msgstr "Shred Befehl nicht gefunden, shred wird deaktiviert." msgid "Skip subdirectory '%s' in including." msgstr "Übergehe Unterverzeichnis »%s« bei Einbindung." -#: LogRotate/Handler.py:1939 +#: LogRotate/Handler.py:2046 #, python-format msgid "Source file '%(source)s' and target file '%(target)s' are the same file." msgstr "Die Quelldatei »%(source)s« und die Zieldatei »%(target)s« sind identisch." -#: LogRotate/Handler.py:1932 +#: LogRotate/Handler.py:2038 #, python-format msgid "Source file '%s' for compression doesn't exists." msgstr "Die Quelldatei »%s« für Komprimierung existiert nicht." @@ -1542,11 +1543,11 @@ msgstr "Beginn einer Logdatei-Definition." msgid "Starting a new log directive with default values." msgstr "Beginn einer neuen Logdateidefinition mit Vorgabewerten." -#: LogRotate/Handler.py:682 +#: LogRotate/Handler.py:685 msgid "Starting underlying rotation ..." msgstr "Starte eigentliche Rotation ..." -#: LogRotate/Handler.py:697 +#: LogRotate/Handler.py:700 #, python-format msgid "State of script '%s':" msgstr "Status des Skripts »%s«:" @@ -1565,11 +1566,11 @@ msgstr "Die Statusdatei »%s« is keine reguläre Datei." msgid "Status file object will destroyed." msgstr "Statusdatei-Objekt wird zerstört." -#: LogRotate/Handler.py:2423 +#: LogRotate/Handler.py:2548 msgid "Struct files2send:" msgstr "Sruktur files2send:" -#: LogRotate/Handler.py:2007 LogRotate/Handler.py:2016 +#: LogRotate/Handler.py:2124 LogRotate/Handler.py:2134 #, python-format msgid "Substituting '%(what)s' in compressoptions with '%(by)s'." msgstr "Ersetze »%(what)s« in den Komprimierungsoptionen durch »%(by)s«." @@ -1605,7 +1606,7 @@ msgstr "" "Syntaxfehler: unausgeglichene Zahl von öffnenden und schließenden " "Klammern." -#: LogRotate/Handler.py:2036 +#: LogRotate/Handler.py:2155 #, python-format msgid "" "Target '%s' of compression doesn't exists after executing compression " @@ -1614,7 +1615,7 @@ msgstr "" "Die Zieldatei »%s« der Komprimierung existiert nicht nach Ausführung des " "Komprimierungskommandos." -#: LogRotate/Handler.py:1943 +#: LogRotate/Handler.py:2051 #, python-format msgid "Target file '%s' for compression allready exists." msgstr "Die Zieldatei der Komprimierung »%s« existiert bereits." @@ -1623,7 +1624,7 @@ msgstr "Die Zieldatei der Komprimierung »%s« existiert bereits." msgid "Test mode is ON." msgstr "Testmodus ist AN." -#: LogRotate/Mailer.py:439 +#: LogRotate/Mailer.py:465 #, python-format msgid "Testing for '%s' ..." msgstr "Teste auf »%s« ..." @@ -1633,7 +1634,7 @@ msgstr "Teste auf »%s« ..." msgid "Testmode, skip test of PID file '%s'." msgstr "Testmodus, übergehe Test der PID-Datei »%s«." -#: LogRotate/Handler.py:645 +#: LogRotate/Handler.py:647 #, python-format msgid "Testmode, skip writing of PID file '%s'." msgstr "Testmodus, übergehe Schreiben der PID-Datei »%s«." @@ -1647,7 +1648,7 @@ msgstr "Die »From«-Adresse darf nicht auf »None« gesetzt werden." msgid "Total %f days found." msgstr "Insgesamt %f Tage gefunden." -#: LogRotate/Handler.py:943 +#: LogRotate/Handler.py:958 #, python-format msgid "Truncating file '%s'." msgstr "Schneide Datei »%s« ab." @@ -1657,12 +1658,12 @@ msgstr "Schneide Datei »%s« ab." msgid "Try reading configuration from '%s' ..." msgstr "Versuche, die Konfiguration aus »%s« zu lesen ..." -#: LogRotate/Handler.py:1674 +#: LogRotate/Handler.py:1766 #, python-format msgid "Try to create directory '%s' ..." msgstr "Versuche, Verzeichnis »%s« zu erstellen ..." -#: LogRotate/Handler.py:605 +#: LogRotate/Handler.py:606 #, python-format msgid "Trying check for process with PID %d ..." msgstr "Versuche, Prozeß mit der PID %d zu überprüfen ..." @@ -1702,7 +1703,7 @@ msgstr "Versuche, »olddir«-Erstellungsnutzer »%s« festzustellen ..." msgid "Trying to include object '%s' ..." msgstr "Versuche, Objekt »%s« einzubinden ..." -#: LogRotate/Handler.py:618 +#: LogRotate/Handler.py:620 #, python-format msgid "Unknown error: '%s'." msgstr "Unbekannter Fehler: »%s«." @@ -1717,24 +1718,24 @@ msgstr "Unbekannte Option »%s«." msgid "Unsupported option '%s'." msgstr "Nicht unterstützte Option »%s«." -#: LogRotate/Handler.py:1544 +#: LogRotate/Handler.py:1625 #, python-format msgid "Using '%(target)s' as target for rotation of logfile '%(logfile)s'." msgstr "" "Verwende »%(target)s« als Zieldatei der Rotation von Logdatei " "»%(logfile)s«." -#: LogRotate/Mailer.py:264 LogRotate/Mailer.py:445 +#: LogRotate/Mailer.py:269 LogRotate/Mailer.py:471 #, python-format msgid "Using '%s' as the sendmail command." msgstr "Verwende »%s« als »sendmail«-Kommando." -#: LogRotate/Mailer.py:414 +#: LogRotate/Mailer.py:440 #, python-format msgid "Using <%s> as the sender mail address." msgstr "Verwende <%s> als Absender-Mailadresse." -#: LogRotate/Handler.py:1538 +#: LogRotate/Handler.py:1618 #, python-format msgid "Using date extension '.%(ext)s' from pattern '%(pattern)s'." msgstr "Verwende Datumserweiterung ».%(ext)s« aus Muster »%(pattern)s«." @@ -1761,7 +1762,7 @@ msgstr "Ausführlichkeitmodus is AN auf Level: %d" msgid "What the hell is this: '%s'." msgstr "Was zum Teufel ist das denn: »%s«?!" -#: LogRotate/Handler.py:650 +#: LogRotate/Handler.py:652 #, python-format msgid "Writing PID file '%s' ..." msgstr "Schreibe PID-Datei »%s« ..." diff --git a/po/pylogrotate.pot b/po/pylogrotate.pot index 2aef2a9..110616a 100644 --- a/po/pylogrotate.pot +++ b/po/pylogrotate.pot @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: pylogrotate 0.6.0\n" "Report-Msgid-Bugs-To: frank@brehm-online.com\n" -"POT-Creation-Date: 2011-07-15 11:51+0200\n" +"POT-Creation-Date: 2011-07-15 13:16+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -83,12 +83,12 @@ msgstr "" msgid "Called with '%s'." msgstr "" -#: LogRotate/Handler.py:1805 +#: LogRotate/Handler.py:1904 #, python-format msgid "Check, whether logfile '%s' should rotated." msgstr "" -#: LogRotate/Handler.py:1197 +#: LogRotate/Handler.py:1244 #, python-format msgid "Checking file '%s' for deleting ..." msgstr "" @@ -133,34 +133,34 @@ msgstr "" msgid "Checking permissions of status file '%s' ..." msgstr "" -#: LogRotate/Script.py:537 +#: LogRotate/Script.py:549 #, python-format msgid "Checking, whether the script '%s' should be executed." msgstr "" -#: LogRotate/Getopts.py:231 +#: LogRotate/Getopts.py:233 msgid "" "Checks only the given configuration file and does nothing. Conflicts with" " -f." msgstr "" -#: LogRotate/Script.py:505 +#: LogRotate/Script.py:516 #, python-format msgid "Child in script '%(name)s' was terminated by signal %(retcode)d." msgstr "" -#: LogRotate/Handler.py:1769 +#: LogRotate/Handler.py:1868 #, python-format msgid "Child was terminated by signal %d." msgstr "" -#: LogRotate/Getopts.py:259 +#: LogRotate/Getopts.py:262 msgid "" "Command to send mail (instead of using SMTP or the predefined sendmail " "command)." msgstr "" -#: LogRotate/Getopts.py:271 +#: LogRotate/Getopts.py:275 msgid "Common options" msgstr "" @@ -169,36 +169,36 @@ msgstr "" msgid "Compress command '%s' not found." msgstr "" -#: LogRotate/Handler.py:2024 +#: LogRotate/Handler.py:2143 #, python-format msgid "Compress options: '%s'." msgstr "" -#: LogRotate/Handler.py:1954 +#: LogRotate/Handler.py:2064 #, python-format msgid "Compressing file '%(file)s' to '%(target)s' with '%(cmd)s' ..." msgstr "" -#: LogRotate/Handler.py:2216 LogRotate/Handler.py:2283 -#: LogRotate/Handler.py:2358 +#: LogRotate/Handler.py:2112 #, python-format msgid "" -"Compressing source '%(source)s' to target '%(target)s' with module " -"'%(module)s'." +"Compressing source '%(source)s' to target '%(target)s' with command " +"'%(cmd)s'." msgstr "" -#: LogRotate/Handler.py:1996 +#: LogRotate/Handler.py:2341 LogRotate/Handler.py:2408 +#: LogRotate/Handler.py:2483 #, python-format msgid "" -"Compressing source '%(source)s' to target'%(target)s' with command " -"'%(cmd)s'." +"Compressing source '%(source)s' to target '%(target)s' with module " +"'%(module)s'." msgstr "" -#: LogRotate/Handler.py:1910 +#: LogRotate/Handler.py:2016 msgid "Compression of all uncompressed logfiles ..." msgstr "" -#: LogRotate/Handler.py:1124 +#: LogRotate/Handler.py:1168 #, python-format msgid "Compression of file '%s' will be delayed." msgstr "" @@ -211,21 +211,21 @@ msgstr "" msgid "Configuration reader object structure" msgstr "" -#: LogRotate/Handler.py:2107 +#: LogRotate/Handler.py:2229 #, python-format msgid "Copying all file metadata to target '%s' ..." msgstr "" -#: LogRotate/Handler.py:931 +#: LogRotate/Handler.py:943 #, python-format msgid "Copying file '%(from)s' => '%(to)s'." msgstr "" -#: LogRotate/Handler.py:2174 +#: LogRotate/Handler.py:2299 msgid "Copying ownership from source to target." msgstr "" -#: LogRotate/Handler.py:2123 +#: LogRotate/Handler.py:2245 #, python-format msgid "" "Copying permissions and timestamps from source '%(src)s' to target " @@ -276,73 +276,73 @@ msgstr "" msgid "Couldn't open PID file '%(file)s' for reading: %(msg)s" msgstr "" -#: LogRotate/Handler.py:659 +#: LogRotate/Handler.py:661 #, python-format msgid "Couldn't open PID file '%(file)s' for writing: %(msg)s" msgstr "" -#: LogRotate/Handler.py:1702 +#: LogRotate/Handler.py:1796 #, python-format msgid "Create permissions: %(mode)4o, Owner-UID: %(uid)d, Group-GID: %(gid)d" msgstr "" -#: LogRotate/Handler.py:1690 +#: LogRotate/Handler.py:1784 #, python-format msgid "Creating directory '%s' ..." msgstr "" -#: LogRotate/Handler.py:1660 +#: LogRotate/Handler.py:1752 #, python-format msgid "Creating olddir '%s' recursive ..." msgstr "" -#: LogRotate/Handler.py:1200 +#: LogRotate/Handler.py:1247 #, python-format msgid "Current count: %(count)d, current age: %(age)d seconds" msgstr "" -#: LogRotate/Handler.py:1479 +#: LogRotate/Handler.py:1557 #, python-format msgid "Cyclic rotation from '%(from)s' to '%(to)s'." msgstr "" -#: LogRotate/Handler.py:1846 +#: LogRotate/Handler.py:1948 #, python-format msgid "Date of last rotation: %s." msgstr "" -#: LogRotate/Handler.py:1863 +#: LogRotate/Handler.py:1968 #, python-format msgid "Date of next rotation '%(next)s' is in future, rotation not necessary." msgstr "" -#: LogRotate/Handler.py:1850 +#: LogRotate/Handler.py:1953 #, python-format msgid "Date of next rotation: %s." msgstr "" -#: LogRotate/Handler.py:1208 +#: LogRotate/Handler.py:1256 #, python-format msgid "Deleting '%s' because of too much." msgstr "" -#: LogRotate/Handler.py:1217 +#: LogRotate/Handler.py:1266 #, python-format msgid "Deleting '%s' because of too old." msgstr "" -#: LogRotate/Handler.py:1888 +#: LogRotate/Handler.py:1994 #, python-format msgid "Deleting file '%s' ..." msgstr "" -#: LogRotate/Handler.py:2047 LogRotate/Handler.py:2248 -#: LogRotate/Handler.py:2323 LogRotate/Handler.py:2398 +#: LogRotate/Handler.py:2166 LogRotate/Handler.py:2373 +#: LogRotate/Handler.py:2448 LogRotate/Handler.py:2523 #, python-format msgid "Deleting uncompressed file '%s' ..." msgstr "" -#: LogRotate/Handler.py:1880 +#: LogRotate/Handler.py:1986 msgid "Deletion of all superfluid logfiles ..." msgstr "" @@ -351,7 +351,7 @@ msgstr "" msgid "Directive '%s' is not allowed outside of a logfile definition." msgstr "" -#: LogRotate/Handler.py:1679 +#: LogRotate/Handler.py:1771 #, python-format msgid "Directory '%s' allready exists, not created." msgstr "" @@ -361,26 +361,26 @@ msgstr "" msgid "Directory '%s' doesn't exists." msgstr "" -#: LogRotate/Handler.py:1687 +#: LogRotate/Handler.py:1780 #, python-format msgid "Directory '%s' exists, but is not a valid directory." msgstr "" -#: LogRotate/Handler.py:1656 +#: LogRotate/Handler.py:1748 #, python-format msgid "Directory chain to create: '%s'." msgstr "" -#: LogRotate/Getopts.py:284 +#: LogRotate/Getopts.py:288 msgid "Display brief usage message and exit." msgstr "" -#: LogRotate/Handler.py:892 +#: LogRotate/Handler.py:901 #, python-format msgid "Do rotate logfile '%s' ..." msgstr "" -#: LogRotate/Getopts.py:211 +#: LogRotate/Getopts.py:213 msgid "Don't do anything, just test (implies -v and -T)" msgstr "" @@ -388,63 +388,63 @@ msgstr "" msgid "End of a logfile definition." msgstr "" -#: LogRotate/Handler.py:1015 LogRotate/Handler.py:2161 +#: LogRotate/Handler.py:1036 LogRotate/Handler.py:2286 #, python-format msgid "Error on chmod of '%(target)s': %(err)s" msgstr "" -#: LogRotate/Handler.py:1036 LogRotate/Handler.py:2189 +#: LogRotate/Handler.py:1061 LogRotate/Handler.py:2314 #, python-format msgid "Error on chown of '%(file)s': %(err)s" msgstr "" -#: LogRotate/Handler.py:1731 +#: LogRotate/Handler.py:1829 #, python-format msgid "Error on chowning directory '%(dir)s': %(err)s" msgstr "" -#: LogRotate/Handler.py:938 +#: LogRotate/Handler.py:950 #, python-format msgid "Error on copying '%(from)s' => '%(to)s': %(err)s" msgstr "" -#: LogRotate/Handler.py:1712 +#: LogRotate/Handler.py:1809 #, python-format msgid "Error on creating directory '%(dir)s': %(err)s" msgstr "" -#: LogRotate/Handler.py:984 +#: LogRotate/Handler.py:1003 #, python-format msgid "Error on creating file '%(from)s': %(err)s" msgstr "" -#: LogRotate/Handler.py:915 LogRotate/Handler.py:969 +#: LogRotate/Handler.py:924 LogRotate/Handler.py:985 #, python-format msgid "Error on moving '%(from)s' => '%(to)s': %(err)s" msgstr "" -#: LogRotate/Handler.py:2297 LogRotate/Handler.py:2372 +#: LogRotate/Handler.py:2422 LogRotate/Handler.py:2497 #, python-format msgid "Error on open file '%(file)s' on reading: %(err)s" msgstr "" -#: LogRotate/Handler.py:2235 LogRotate/Handler.py:2307 -#: LogRotate/Handler.py:2382 +#: LogRotate/Handler.py:2360 LogRotate/Handler.py:2432 +#: LogRotate/Handler.py:2507 #, python-format msgid "Error on open file '%(file)s' on writing: %(err)s" msgstr "" -#: LogRotate/Handler.py:1894 +#: LogRotate/Handler.py:2000 #, python-format msgid "Error on removing file '%(file)s': %(err)s" msgstr "" -#: LogRotate/Handler.py:2145 +#: LogRotate/Handler.py:2268 #, python-format msgid "Error on setting times on target file '%(target)s': %(err)s" msgstr "" -#: LogRotate/Handler.py:950 +#: LogRotate/Handler.py:965 #, python-format msgid "Error on truncing file '%(from)s': %(err)s" msgstr "" @@ -454,48 +454,48 @@ msgstr "" msgid "Error removing PID file '%(file)s': %(msg)" msgstr "" -#: LogRotate/Handler.py:2054 LogRotate/Handler.py:2255 -#: LogRotate/Handler.py:2330 LogRotate/Handler.py:2405 +#: LogRotate/Handler.py:2173 LogRotate/Handler.py:2380 +#: LogRotate/Handler.py:2455 LogRotate/Handler.py:2530 #, python-format msgid "Error removing uncompressed file '%(file)s': %(msg)" msgstr "" -#: LogRotate/Handler.py:1758 +#: LogRotate/Handler.py:1857 #, python-format msgid "Executing command: '%s'." msgstr "" -#: LogRotate/Handler.py:788 +#: LogRotate/Handler.py:792 #, python-format msgid "Executing firstaction script '%s' ..." msgstr "" -#: LogRotate/Handler.py:855 +#: LogRotate/Handler.py:864 #, python-format msgid "Executing lastaction script '%s' ..." msgstr "" -#: LogRotate/Handler.py:834 +#: LogRotate/Handler.py:842 #, python-format msgid "Executing postrun script '%s' ..." msgstr "" -#: LogRotate/Handler.py:806 +#: LogRotate/Handler.py:813 #, python-format msgid "Executing prerun script '%s' ..." msgstr "" -#: LogRotate/Script.py:492 +#: LogRotate/Script.py:502 #, python-format msgid "Executing script '%(name)s' with command: '%(cmd)s'" msgstr "" -#: LogRotate/Handler.py:1776 +#: LogRotate/Handler.py:1875 #, python-format msgid "Execution failed: %s" msgstr "" -#: LogRotate/Script.py:513 +#: LogRotate/Script.py:525 #, python-format msgid "Execution of script '%(name)s' failed: %(error)s" msgstr "" @@ -504,42 +504,42 @@ msgstr "" msgid "Failing size definition." msgstr "" -#: LogRotate/Config.py:694 LogRotate/Config.py:721 LogRotate/Mailer.py:496 +#: LogRotate/Config.py:694 LogRotate/Config.py:721 LogRotate/Mailer.py:523 #, python-format msgid "File '%s' doesn't exists." msgstr "" -#: LogRotate/Handler.py:1949 +#: LogRotate/Handler.py:2058 #, python-format msgid "File '%s' has a size of 0, skip compressing." msgstr "" -#: LogRotate/Mailer.py:501 +#: LogRotate/Mailer.py:528 #, python-format msgid "File '%s' is not a regular file." msgstr "" -#: LogRotate/Handler.py:1112 +#: LogRotate/Handler.py:1154 #, python-format msgid "File '%s' seems to be compressed, skip it." msgstr "" -#: LogRotate/Handler.py:1118 +#: LogRotate/Handler.py:1161 #, python-format msgid "File '%s' will be deleted, compression unnecessary." msgstr "" -#: LogRotate/Handler.py:2097 LogRotate/Handler.py:2115 +#: LogRotate/Handler.py:2219 LogRotate/Handler.py:2237 #, python-format msgid "File or directory '%s' doesn't exists." msgstr "" -#: LogRotate/Handler.py:1855 +#: LogRotate/Handler.py:1959 #, python-format msgid "Filesize %(filesize)d is less than %(maxsize)d, rotation not necessary." msgstr "" -#: LogRotate/Handler.py:1824 +#: LogRotate/Handler.py:1924 #, python-format msgid "Filesize of '%(file)s': %(size)d." msgstr "" @@ -549,7 +549,7 @@ msgstr "" msgid "Find all logfiles for shell matching pattern '%s' ..." msgstr "" -#: LogRotate/Getopts.py:221 +#: LogRotate/Getopts.py:223 msgid "Force file rotation" msgstr "" @@ -610,15 +610,15 @@ msgstr "" msgid "Found logfile '%(file)s' with rotation date '%(date)s'." msgstr "" -#: LogRotate/Handler.py:1134 +#: LogRotate/Handler.py:1179 msgid "Found logfiles to compress:" msgstr "" -#: LogRotate/Handler.py:1224 +#: LogRotate/Handler.py:1274 msgid "Found logfiles to delete:" msgstr "" -#: LogRotate/Handler.py:1379 +#: LogRotate/Handler.py:1449 msgid "Found old logfiles:" msgstr "" @@ -627,7 +627,7 @@ msgstr "" msgid "Found option '%(opt)s' with value '%(val)s'." msgstr "" -#: LogRotate/Handler.py:1496 +#: LogRotate/Handler.py:1575 msgid "Found rotations:" msgstr "" @@ -647,7 +647,7 @@ msgstr "" msgid "Found value '%(value)s' behind the boolean option '%(option)s', ignoring." msgstr "" -#: LogRotate/Mailer.py:571 +#: LogRotate/Mailer.py:619 msgid "Generated E-mail:" msgstr "" @@ -672,17 +672,17 @@ msgstr "" msgid "Got mail address pair:" msgstr "" -#: LogRotate/Script.py:501 +#: LogRotate/Script.py:511 #, python-format msgid "Got returncode for script '%(name)s': '%(retcode)s'" msgstr "" -#: LogRotate/Handler.py:1766 +#: LogRotate/Handler.py:1865 #, python-format msgid "Got returncode: '%s'." msgstr "" -#: LogRotate/Mailer.py:539 +#: LogRotate/Mailer.py:582 #, python-format msgid "Guessed content-type: '%(ctype)s' and encoding '%(encoding)s'." msgstr "" @@ -721,7 +721,7 @@ msgstr "" msgid "Incompatible version of status file '%(file)s': %(header)s" msgstr "" -#: LogRotate/Mailer.py:433 +#: LogRotate/Mailer.py:459 msgid "Initial search for the sendmail executable ..." msgstr "" @@ -790,11 +790,11 @@ msgstr "" msgid "Invalid taboo pattern type '%s' given." msgstr "" -#: LogRotate/Getopts.py:324 +#: LogRotate/Getopts.py:328 msgid "Invalid usage of --force and --config-check." msgstr "" -#: LogRotate/Script.py:236 LogRotate/Script.py:262 +#: LogRotate/Script.py:241 LogRotate/Script.py:268 #, python-format msgid "Invalid value for property '%s' given." msgstr "" @@ -821,27 +821,27 @@ msgid "" "%(rownum)d) and so not taken a second time." msgstr "" -#: LogRotate/Handler.py:742 +#: LogRotate/Handler.py:745 #, python-format msgid "Logfile '%s' WILL rotated." msgstr "" -#: LogRotate/Handler.py:1809 +#: LogRotate/Handler.py:1908 #, python-format msgid "Logfile '%s' doesn't exists, not rotated." msgstr "" -#: LogRotate/Handler.py:1830 +#: LogRotate/Handler.py:1931 #, python-format msgid "Logfile '%s' has a filesize of Zero, not rotated." msgstr "" -#: LogRotate/Handler.py:1818 +#: LogRotate/Handler.py:1917 #, python-format msgid "Logfile '%s' is not a regular file, not rotated." msgstr "" -#: LogRotate/Handler.py:744 +#: LogRotate/Handler.py:747 #, python-format msgid "Logfile '%s' will NOT rotated." msgstr "" @@ -859,7 +859,7 @@ msgstr "" msgid "Logrotate config reader initialised." msgstr "" -#: LogRotate/Script.py:411 +#: LogRotate/Script.py:419 #, python-format msgid "Logrotate script object '%s' will destroyed." msgstr "" @@ -872,37 +872,37 @@ msgstr "" msgid "Logrotating ready for work." msgstr "" -#: LogRotate/Handler.py:785 +#: LogRotate/Handler.py:788 msgid "Looking, whether the firstaction script should be executed." msgstr "" -#: LogRotate/Handler.py:843 +#: LogRotate/Handler.py:851 msgid "Looking, whether the lastaction script should be executed." msgstr "" -#: LogRotate/Handler.py:822 +#: LogRotate/Handler.py:829 msgid "Looking, whether the postrun script should be executed." msgstr "" -#: LogRotate/Handler.py:797 +#: LogRotate/Handler.py:803 msgid "Looking, whether the prerun script should be executed." msgstr "" -#: LogRotate/Mailer.py:359 +#: LogRotate/Mailer.py:385 msgid "Mailer object will destroyed." msgstr "" -#: LogRotate/Handler.py:1189 +#: LogRotate/Handler.py:1236 #, python-format msgid "Max. count rotations: %d" msgstr "" -#: LogRotate/Handler.py:1181 +#: LogRotate/Handler.py:1228 #, python-format msgid "Maxage: %d seconds" msgstr "" -#: LogRotate/Handler.py:908 LogRotate/Handler.py:958 +#: LogRotate/Handler.py:917 LogRotate/Handler.py:974 #, python-format msgid "Moving file '%(from)s' => '%(to)s'." msgstr "" @@ -922,7 +922,7 @@ msgstr "" msgid "Negative value %(value)s for option '%(option)s' is not allowed." msgstr "" -#: LogRotate/Handler.py:2092 +#: LogRotate/Handler.py:2213 msgid "" "Neither 'target' nor 'statinfo' was given on calling " "_copy_file_metadata()." @@ -956,24 +956,24 @@ msgstr "" msgid "New taboo pattern: '%s'." msgstr "" -#: LogRotate/Script.py:488 +#: LogRotate/Script.py:497 #, python-format msgid "No command to execute defined in script '%s'." msgstr "" -#: LogRotate/Handler.py:1092 +#: LogRotate/Handler.py:1132 msgid "No compression defined." msgstr "" -#: LogRotate/Getopts.py:328 +#: LogRotate/Getopts.py:332 msgid "No configuration file given." msgstr "" -#: LogRotate/Handler.py:1577 +#: LogRotate/Handler.py:1659 msgid "No dirname directive for olddir given." msgstr "" -#: LogRotate/Mailer.py:269 LogRotate/Mailer.py:450 +#: LogRotate/Mailer.py:274 LogRotate/Mailer.py:476 #, python-format msgid "No execute permissions to '%s'." msgstr "" @@ -989,7 +989,7 @@ msgstr "" msgid "No file or directory given in a include directive." msgstr "" -#: LogRotate/Handler.py:678 +#: LogRotate/Handler.py:681 msgid "No logfile definitions found." msgstr "" @@ -1006,31 +1006,31 @@ msgstr "" msgid "No logfile pattern defined." msgstr "" -#: LogRotate/Handler.py:1914 +#: LogRotate/Handler.py:2020 msgid "No logfiles to compress found." msgstr "" -#: LogRotate/Handler.py:1884 +#: LogRotate/Handler.py:1990 msgid "No logfiles to delete found." msgstr "" -#: LogRotate/Handler.py:1176 +#: LogRotate/Handler.py:1223 msgid "No maxage given." msgstr "" -#: LogRotate/Handler.py:1098 LogRotate/Handler.py:1168 +#: LogRotate/Handler.py:1138 LogRotate/Handler.py:1215 msgid "No old logfiles available." msgstr "" -#: LogRotate/Handler.py:1137 +#: LogRotate/Handler.py:1183 msgid "No old logfiles to compress found." msgstr "" -#: LogRotate/Handler.py:1227 +#: LogRotate/Handler.py:1278 msgid "No old logfiles to delete found." msgstr "" -#: LogRotate/Handler.py:614 +#: LogRotate/Handler.py:616 #, python-format msgid "No permission to signal the process %d ..." msgstr "" @@ -1039,7 +1039,7 @@ msgstr "" msgid "No script name given in a script directive." msgstr "" -#: LogRotate/Handler.py:598 +#: LogRotate/Handler.py:599 #, python-format msgid "No useful information found in PID file '%(file)s': '%(line)s'" msgstr "" @@ -1054,32 +1054,32 @@ msgstr "" msgid "No write access to status file '%s'." msgstr "" -#: LogRotate/Handler.py:1639 +#: LogRotate/Handler.py:1729 #, python-format msgid "No write and execute access to olddir '%s'." msgstr "" -#: LogRotate/Handler.py:1634 +#: LogRotate/Handler.py:1723 #, python-format msgid "Olddir '%s' allready exists, not created." msgstr "" -#: LogRotate/Handler.py:1646 +#: LogRotate/Handler.py:1737 #, python-format msgid "Olddir '%s' exists, but is not a valid directory." msgstr "" -#: LogRotate/Handler.py:1626 +#: LogRotate/Handler.py:1715 #, python-format msgid "Olddir name is now '%s'." msgstr "" -#: LogRotate/Mailer.py:277 +#: LogRotate/Mailer.py:282 #, python-format msgid "Only absolute path allowed for a sendmail command: '%s'." msgstr "" -#: LogRotate/Getopts.py:332 +#: LogRotate/Getopts.py:336 msgid "Only one configuration file is allowed." msgstr "" @@ -1095,8 +1095,8 @@ msgid "" "used." msgstr "" -#: LogRotate/Handler.py:1023 LogRotate/Handler.py:1719 -#: LogRotate/Handler.py:2178 +#: LogRotate/Handler.py:1045 LogRotate/Handler.py:1816 +#: LogRotate/Handler.py:2303 msgid "Only root may execute chown()." msgstr "" @@ -1175,11 +1175,11 @@ msgstr "" msgid "Parent directory '%(dir)s' of status file '%(file)s' is not a directory." msgstr "" -#: LogRotate/Getopts.py:250 +#: LogRotate/Getopts.py:253 msgid "Path of PID file (different to configuration)" msgstr "" -#: LogRotate/Getopts.py:241 +#: LogRotate/Getopts.py:244 msgid "Path of state file (different to configuration)" msgstr "" @@ -1189,7 +1189,7 @@ msgstr "" msgid "Pattern '%s'." msgstr "" -#: LogRotate/Handler.py:737 +#: LogRotate/Handler.py:740 #, python-format msgid "Performing logfile '%s' ..." msgstr "" @@ -1209,12 +1209,12 @@ msgstr "" msgid "Postrotate script '%s' not found." msgstr "" -#: LogRotate/Handler.py:610 +#: LogRotate/Handler.py:612 #, python-format msgid "Process with PID %d anonymous died." msgstr "" -#: LogRotate/Handler.py:622 +#: LogRotate/Handler.py:624 #, python-format msgid "Process with PID %d is allready running." msgstr "" @@ -1234,7 +1234,7 @@ msgstr "" msgid "Reading status file '%s' ..." msgstr "" -#: LogRotate/Handler.py:977 +#: LogRotate/Handler.py:996 #, python-format msgid "Recreating file '%s'." msgstr "" @@ -1283,32 +1283,32 @@ msgstr "" msgid "Rest after years: '%s'." msgstr "" -#: LogRotate/Handler.py:1469 +#: LogRotate/Handler.py:1546 #, python-format msgid "Resulting target '%s' exists, retrieve cyclic rotation ..." msgstr "" -#: LogRotate/Handler.py:1422 +#: LogRotate/Handler.py:1498 #, python-format msgid "" "Retrieving all movings and rotations for logfile '%(file)s' to target " "'%(target)s' ..." msgstr "" -#: LogRotate/Handler.py:1257 +#: LogRotate/Handler.py:1312 #, python-format msgid "Retrieving all old logfiles for file '%s' ..." msgstr "" -#: LogRotate/Handler.py:1085 +#: LogRotate/Handler.py:1125 msgid "Retrieving logfiles to compress ..." msgstr "" -#: LogRotate/Handler.py:1161 +#: LogRotate/Handler.py:1208 msgid "Retrieving logfiles to delete ..." msgstr "" -#: LogRotate/Handler.py:1524 +#: LogRotate/Handler.py:1603 #, python-format msgid "Retrieving the name of the rotated file of '%s' ..." msgstr "" @@ -1317,12 +1317,12 @@ msgstr "" msgid "Rotates, compresses and mails system logs." msgstr "" -#: LogRotate/Handler.py:1836 +#: LogRotate/Handler.py:1938 #, python-format msgid "Rotating of '%s' because of force mode." msgstr "" -#: LogRotate/Handler.py:726 +#: LogRotate/Handler.py:729 msgid "Rotating of logfile definition:" msgstr "" @@ -1331,7 +1331,7 @@ msgstr "" msgid "Script name '%s' is allready declared, it will be overwritten." msgstr "" -#: LogRotate/Handler.py:1367 +#: LogRotate/Handler.py:1437 #, python-format msgid "Search for pattern '%s' ..." msgstr "" @@ -1341,12 +1341,12 @@ msgstr "" msgid "Search path '%s' doesn't exists or is not a directory." msgstr "" -#: LogRotate/Mailer.py:512 +#: LogRotate/Mailer.py:539 #, python-format msgid "Sending mail with attached file '%(file)s' to: %(rcpt)s" msgstr "" -#: LogRotate/Mailer.py:273 +#: LogRotate/Mailer.py:278 #, python-format msgid "Sendmail command '%s' not found." msgstr "" @@ -1361,11 +1361,11 @@ msgstr "" msgid "Set sender mail address to: '%s'." msgstr "" -#: LogRotate/Getopts.py:201 +#: LogRotate/Getopts.py:203 msgid "Set the verbosity level" msgstr "" -#: LogRotate/Getopts.py:190 +#: LogRotate/Getopts.py:192 msgid "Set this do simulate commands" msgstr "" @@ -1379,7 +1379,7 @@ msgstr "" msgid "Setting '%(what)s' in '%(directive)s' to %(to)s." msgstr "" -#: LogRotate/Handler.py:2139 +#: LogRotate/Handler.py:2262 #, python-format msgid "Setting atime and mtime of target '%s'." msgstr "" @@ -1409,12 +1409,12 @@ msgstr "" msgid "Setting mailfirst in '%(directive)s' to '%(value)s'." msgstr "" -#: LogRotate/Handler.py:1029 +#: LogRotate/Handler.py:1051 #, python-format msgid "Setting ownership of '%(file)s' to uid %(uid)d and gid %(gid)d." msgstr "" -#: LogRotate/Handler.py:1008 LogRotate/Handler.py:2154 +#: LogRotate/Handler.py:1028 LogRotate/Handler.py:2278 #, python-format msgid "Setting permissions of '%(target)s' to %(mode)4o." msgstr "" @@ -1424,11 +1424,11 @@ msgstr "" msgid "Setting rotation date of '%(file)s' to '%(date)s' ..." msgstr "" -#: LogRotate/Getopts.py:273 +#: LogRotate/Getopts.py:277 msgid "Shows a help message and exit." msgstr "" -#: LogRotate/Getopts.py:293 +#: LogRotate/Getopts.py:297 msgid "Shows the version number of the program and exit." msgstr "" @@ -1446,12 +1446,12 @@ msgstr "" msgid "Skip subdirectory '%s' in including." msgstr "" -#: LogRotate/Handler.py:1939 +#: LogRotate/Handler.py:2046 #, python-format msgid "Source file '%(source)s' and target file '%(target)s' are the same file." msgstr "" -#: LogRotate/Handler.py:1932 +#: LogRotate/Handler.py:2038 #, python-format msgid "Source file '%s' for compression doesn't exists." msgstr "" @@ -1489,11 +1489,11 @@ msgstr "" msgid "Starting a new log directive with default values." msgstr "" -#: LogRotate/Handler.py:682 +#: LogRotate/Handler.py:685 msgid "Starting underlying rotation ..." msgstr "" -#: LogRotate/Handler.py:697 +#: LogRotate/Handler.py:700 #, python-format msgid "State of script '%s':" msgstr "" @@ -1512,11 +1512,11 @@ msgstr "" msgid "Status file object will destroyed." msgstr "" -#: LogRotate/Handler.py:2423 +#: LogRotate/Handler.py:2548 msgid "Struct files2send:" msgstr "" -#: LogRotate/Handler.py:2007 LogRotate/Handler.py:2016 +#: LogRotate/Handler.py:2124 LogRotate/Handler.py:2134 #, python-format msgid "Substituting '%(what)s' in compressoptions with '%(by)s'." msgstr "" @@ -1544,14 +1544,14 @@ msgstr "" msgid "Syntax error: unbalanced closing curly bracket found." msgstr "" -#: LogRotate/Handler.py:2036 +#: LogRotate/Handler.py:2155 #, python-format msgid "" "Target '%s' of compression doesn't exists after executing compression " "command." msgstr "" -#: LogRotate/Handler.py:1943 +#: LogRotate/Handler.py:2051 #, python-format msgid "Target file '%s' for compression allready exists." msgstr "" @@ -1560,7 +1560,7 @@ msgstr "" msgid "Test mode is ON." msgstr "" -#: LogRotate/Mailer.py:439 +#: LogRotate/Mailer.py:465 #, python-format msgid "Testing for '%s' ..." msgstr "" @@ -1570,7 +1570,7 @@ msgstr "" msgid "Testmode, skip test of PID file '%s'." msgstr "" -#: LogRotate/Handler.py:645 +#: LogRotate/Handler.py:647 #, python-format msgid "Testmode, skip writing of PID file '%s'." msgstr "" @@ -1584,7 +1584,7 @@ msgstr "" msgid "Total %f days found." msgstr "" -#: LogRotate/Handler.py:943 +#: LogRotate/Handler.py:958 #, python-format msgid "Truncating file '%s'." msgstr "" @@ -1594,12 +1594,12 @@ msgstr "" msgid "Try reading configuration from '%s' ..." msgstr "" -#: LogRotate/Handler.py:1674 +#: LogRotate/Handler.py:1766 #, python-format msgid "Try to create directory '%s' ..." msgstr "" -#: LogRotate/Handler.py:605 +#: LogRotate/Handler.py:606 #, python-format msgid "Trying check for process with PID %d ..." msgstr "" @@ -1639,7 +1639,7 @@ msgstr "" msgid "Trying to include object '%s' ..." msgstr "" -#: LogRotate/Handler.py:618 +#: LogRotate/Handler.py:620 #, python-format msgid "Unknown error: '%s'." msgstr "" @@ -1654,22 +1654,22 @@ msgstr "" msgid "Unsupported option '%s'." msgstr "" -#: LogRotate/Handler.py:1544 +#: LogRotate/Handler.py:1625 #, python-format msgid "Using '%(target)s' as target for rotation of logfile '%(logfile)s'." msgstr "" -#: LogRotate/Mailer.py:264 LogRotate/Mailer.py:445 +#: LogRotate/Mailer.py:269 LogRotate/Mailer.py:471 #, python-format msgid "Using '%s' as the sendmail command." msgstr "" -#: LogRotate/Mailer.py:414 +#: LogRotate/Mailer.py:440 #, python-format msgid "Using <%s> as the sender mail address." msgstr "" -#: LogRotate/Handler.py:1538 +#: LogRotate/Handler.py:1618 #, python-format msgid "Using date extension '.%(ext)s' from pattern '%(pattern)s'." msgstr "" @@ -1694,7 +1694,7 @@ msgstr "" msgid "What the hell is this: '%s'." msgstr "" -#: LogRotate/Handler.py:650 +#: LogRotate/Handler.py:652 #, python-format msgid "Writing PID file '%s' ..." msgstr ""