From 46fd427ce067237b6e25a6f4027c86f2dab1e662 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Fri, 1 Apr 2022 14:34:35 +0200 Subject: [PATCH] Removing lib/pp_admintools/pidfile.py --- lib/pp_admintools/dns_deploy_zones_app.py | 4 +- lib/pp_admintools/pidfile.py | 534 ---------------------- locale/de_DE/LC_MESSAGES/pp_admintools.po | 118 +---- locale/en_US/LC_MESSAGES/pp_admintools.po | 116 +---- locale/pp_admintools.pot | 116 +---- 5 files changed, 9 insertions(+), 879 deletions(-) delete mode 100644 lib/pp_admintools/pidfile.py diff --git a/lib/pp_admintools/dns_deploy_zones_app.py b/lib/pp_admintools/dns_deploy_zones_app.py index ff89524..0b693f8 100644 --- a/lib/pp_admintools/dns_deploy_zones_app.py +++ b/lib/pp_admintools/dns_deploy_zones_app.py @@ -34,14 +34,14 @@ from fb_tools.common import pp, to_str from fb_tools.app import BaseApplication +from fb_tools.pidfile import PidFileError, PidFile + from . import __version__ as GLOBAL_VERSION from .pdns_app import PpPDNSAppError, PpPDNSApplication from .dns_deploy_zones_config import DnsDeployZonesConfig -from .pidfile import PidFileError, PidFile - from .xlate import XLATOR __version__ = '0.8.2' diff --git a/lib/pp_admintools/pidfile.py b/lib/pp_admintools/pidfile.py deleted file mode 100644 index f8635ee..0000000 --- a/lib/pp_admintools/pidfile.py +++ /dev/null @@ -1,534 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -""" -@author: Frank Brehm -@contact: frank.brehm@pixelpark.com -@copyright: © 2021 by Frank Brehm, Berlin -@summary: A module for a pidfile object. - It provides methods to define, check, create - and remove a pidfile. -""" -from __future__ import absolute_import - -# Standard modules -import os -import sys -import logging - -import re -import signal -import errno - -# Third party modules -import six -from six import reraise - -# Own modules -from fb_tools.errors import ReadTimeoutError -from fb_tools.common import to_utf8 -from fb_tools.obj import FbBaseObjectError, FbBaseObject - -from .xlate import XLATOR - -__version__ = '0.3.1' - -LOG = logging.getLogger(__name__) - -_ = XLATOR.gettext - - -# ============================================================================= -class PidFileError(FbBaseObjectError): - """Base error class for all exceptions happened during - handling a pidfile.""" - - pass - - -# ============================================================================= -class InvalidPidFileError(PidFileError): - """An error class indicating, that the given pidfile is unusable""" - - def __init__(self, pidfile, reason=None): - """ - Constructor. - - @param pidfile: the filename of the invalid pidfile. - @type pidfile: str - @param reason: the reason, why the pidfile is invalid. - @type reason: str - - """ - - self.pidfile = pidfile - self.reason = reason - - # ------------------------------------------------------------------------- - def __str__(self): - """Typecasting into a string for error output.""" - - msg = None - if self.reason: - msg = _("Invalid pidfile {f!r} given: {r}").format( - f=self.pidfile, r=self.reason) - else: - msg = _("Invalid pidfile {!r} given.").format(self.pidfile) - - return msg - -# ============================================================================= -class PidFileInUseError(PidFileError): - """ - An error class indicating, that the given pidfile is in use - by another application. - """ - - def __init__(self, pidfile, pid): - """ - Constructor. - - @param pidfile: the filename of the pidfile. - @type pidfile: str - @param pid: the PID of the process owning the pidfile - @type pid: int - - """ - - self.pidfile = pidfile - self.pid = pid - - # ------------------------------------------------------------------------- - def __str__(self): - """Typecasting into a string for error output.""" - - msg = _( - "The pidfile {f!r} is currently in use by the application with the PID {p}.").format( - f=self.pidfile, p=self.pid) - - return msg - - -# ============================================================================= -class PidFile(FbBaseObject): - """ - Base class for a pidfile object. - """ - - open_args = {} - if six.PY3: - open_args = { - 'encoding': 'utf-8', - 'errors': 'surrogateescape', - } - - # ------------------------------------------------------------------------- - def __init__( - self, filename, auto_remove=True, appname=None, verbose=0, - version=__version__, base_dir=None, - initialized=False, simulate=False, timeout=10): - """ - Initialisation of the pidfile object. - - @raise ValueError: no filename was given - @raise PidFileError: on some errors. - - @param filename: the filename of the pidfile - @type filename: str - @param auto_remove: Remove the self created pidfile on destroying - the current object - @type auto_remove: bool - @param appname: name of the current running application - @type appname: str - @param verbose: verbose level - @type verbose: int - @param version: the version string of the current object or application - @type version: str - @param base_dir: the base directory of all operations - @type base_dir: str - @param initialized: initialisation is complete after __init__() - of this object - @type initialized: bool - @param simulate: simulation mode - @type simulate: bool - @param timeout: timeout in seconds for IO operations on pidfile - @type timeout: int - - @return: None - """ - - self._created = False - """ - @ivar: the pidfile was created by this current object - @type: bool - """ - - super(PidFile, self).__init__( - appname=appname, - verbose=verbose, - version=version, - base_dir=base_dir, - initialized=False, - ) - - if not filename: - raise ValueError(_( - 'No filename given on initializing {} object.').format('PidFile')) - - self._filename = os.path.abspath(str(filename)) - """ - @ivar: The filename of the pidfile - @type: str - """ - - self._auto_remove = bool(auto_remove) - """ - @ivar: Remove the self created pidfile on destroying the current object - @type: bool - """ - - self._simulate = bool(simulate) - """ - @ivar: Simulation mode - @type: bool - """ - - self._timeout = int(timeout) - """ - @ivar: timeout in seconds for IO operations on pidfile - @type: int - """ - - # ----------------------------------------------------------- - @property - def filename(self): - """The filename of the pidfile.""" - return self._filename - - # ----------------------------------------------------------- - @property - def auto_remove(self): - """Remove the self created pidfile on destroying the current object.""" - return self._auto_remove - - @auto_remove.setter - def auto_remove(self, value): - self._auto_remove = bool(value) - - # ----------------------------------------------------------- - @property - def simulate(self): - """Simulation mode.""" - return self._simulate - - # ----------------------------------------------------------- - @property - def created(self): - """The pidfile was created by this current object.""" - return self._created - - # ----------------------------------------------------------- - @property - def timeout(self): - """The timeout in seconds for IO operations on pidfile.""" - return self._timeout - - # ----------------------------------------------------------- - @property - def parent_dir(self): - """The directory containing the pidfile.""" - return os.path.dirname(self.filename) - - # ------------------------------------------------------------------------- - def as_dict(self, short=True): - """ - Transforms the elements of the object into a dict - - @param short: don't include local properties in resulting dict. - @type short: bool - - @return: structure as dict - @rtype: dict - """ - - res = super(PidFile, self).as_dict(short=short) - res['filename'] = self.filename - res['auto_remove'] = self.auto_remove - res['simulate'] = self.simulate - res['created'] = self.created - res['timeout'] = self.timeout - res['parent_dir'] = self.parent_dir - res['open_args'] = self.open_args - - return res - - # ------------------------------------------------------------------------- - def __repr__(self): - """Typecasting into a string for reproduction.""" - - out = "<%s(" % (self.__class__.__name__) - - fields = [] - fields.append("filename=%r" % (self.filename)) - fields.append("auto_remove=%r" % (self.auto_remove)) - fields.append("appname=%r" % (self.appname)) - fields.append("verbose=%r" % (self.verbose)) - fields.append("base_dir=%r" % (self.base_dir)) - fields.append("initialized=%r" % (self.initialized)) - fields.append("simulate=%r" % (self.simulate)) - fields.append("timeout=%r" % (self.timeout)) - - out += ", ".join(fields) + ")>" - return out - - # ------------------------------------------------------------------------- - def __del__(self): - """Destructor. Removes the pidfile, if it was created by ourselfes.""" - - if not self.created: - return - - if not os.path.exists(self.filename): - if self.verbose > 3: - LOG.debug(_("Pidfile {!r} doesn't exists, not removing.").format(self.filename)) - return - - if not self.auto_remove: - if self.verbose > 3: - LOG.debug(_("Auto removing disabled, don't deleting {!r}.").format(self.filename)) - return - - if self.verbose > 1: - LOG.debug(_("Removing pidfile {!r} ...").format(self.filename)) - if self.simulate: - if self.verbose > 1: - LOG.debug(_("Just kidding ...")) - return - try: - os.remove(self.filename) - except OSError as e: - LOG.err(_("Could not delete pidfile {f!r}: {e}").format(f=self.filename, e=e)) - except Exception as e: - self.handle_error(str(e), e.__class__.__name__, True) - - # ------------------------------------------------------------------------- - def create(self, pid=None): - """ - The main method of this class. It tries to write the PID of the process - into the pidfile. - - @param pid: the pid to write into the pidfile. If not given, the PID of - the current process will taken. - @type pid: int - - """ - - if pid: - pid = int(pid) - if pid <= 0: - msg = _("Invalid PID {p} for creating pidfile {f!r} given.").format( - p=pid, f=self.filename) - raise PidFileError(msg) - else: - pid = os.getpid() - - if self.check(): - - LOG.info(_("Deleting pidfile {!r} ...").format(self.filename)) - if self.simulate: - LOG.debug(_("Just kidding ...")) - else: - try: - os.remove(self.filename) - except OSError as e: - raise InvalidPidFileError(self.filename, str(e)) - - if self.verbose > 1: - LOG.debug(_("Trying opening {!r} exclusive ...").format(self.filename)) - - if self.simulate: - LOG.debug(_("Simulation mode - don't real writing in {!r}.").format(self.filename)) - self._created = True - return - - fd = None - try: - fd = os.open( - self.filename, os.O_CREAT | os.O_EXCL | os.O_WRONLY, 0o644) - except OSError as e: - error_tuple = sys.exc_info() - msg = _("Error on creating pidfile {f!r}: {e}").format(f=self.filename, e=e) - reraise(PidFileError, msg, error_tuple[2]) - - if self.verbose > 2: - LOG.debug(_("Writing {p} into {f!r} ...").format(p=pid, f=self.filename)) - - out = to_utf8("%d\n" % (pid)) - try: - os.write(fd, out) - finally: - os.close(fd) - - self._created = True - - # ------------------------------------------------------------------------- - def recreate(self, pid=None): - """ - Rewrites an even created pidfile with the current PID. - - @param pid: the pid to write into the pidfile. If not given, the PID of - the current process will taken. - @type pid: int - - """ - - if not self.created: - msg = _("Calling {} on a not self created pidfile.").format('recreate()') - raise PidFileError(msg) - - if pid: - pid = int(pid) - if pid <= 0: - msg = "Invalid PID {p} for creating pidfile {f!r} given.".format( - p=pid, f=self.filename) - raise PidFileError(msg) - else: - pid = os.getpid() - - if self.verbose > 1: - LOG.debug(_("Trying opening {!r} for recreate ...").format(self.filename)) - - if self.simulate: - LOG.debug(_("Simulation mode - don't real writing in {!r}.").format(self.filename)) - return - - fh = None - try: - fh = open(self.filename, 'w', **self.open_args) - except OSError as e: - error_tuple = sys.exc_info() - msg = _("Error on recreating pidfile {f!r}: {e}").format(f=self.filename, e=e) - reraise(PidFileError, msg, error_tuple[2]) - - if self.verbose > 2: - LOG.debug(_("Writing {p} into {f!r} ...").format(p=pid, f=self.filename)) - - try: - fh.write("%d\n" % (pid)) - finally: - fh.close() - - # ------------------------------------------------------------------------- - def check(self): - """ - This methods checks the usability of the pidfile. - If the method doesn't raise an exception, the pidfile is usable. - - It returns, whether the pidfile exist and can be deleted or not. - - @raise InvalidPidFileError: if the pidfile is unusable - @raise PidFileInUseError: if the pidfile is in use by another application - @raise ReadTimeoutError: on timeout reading an existing pidfile - @raise OSError: on some other reasons, why the existing pidfile - couldn't be read - - @return: the pidfile exists, but can be deleted - or it doesn't - exists. - @rtype: bool - - """ - - if not os.path.exists(self.filename): - if not os.path.exists(self.parent_dir): - reason = _("Pidfile parent directory {!r} doesn't exists.").format( - self.parent_dir) - raise InvalidPidFileError(self.filename, reason) - if not os.path.isdir(self.parent_dir): - reason = _("Pidfile parent directory {!r} is not a directory.").format( - self.parent_dir) - raise InvalidPidFileError(self.filename, reason) - if not os.access(self.parent_dir, os.X_OK): - reason = _("No write access to pidfile parent directory {!r}.").format( - self.parent_dir) - raise InvalidPidFileError(self.filename, reason) - - return False - - if not os.path.isfile(self.filename): - reason = _("It is not a regular file.") - raise InvalidPidFileError(self.filename, self.parent_dir) - - # --------- - def pidfile_read_alarm_caller(signum, sigframe): - """ - This nested function will be called in event of a timeout. - - @param signum: the signal number (POSIX) which happend - @type signum: int - @param sigframe: the frame of the signal - @type sigframe: object - """ - - return ReadTimeoutError(self.timeout, self.filename) - - if self.verbose > 1: - LOG.debug(_("Reading content of pidfile {!r} ...").format(self.filename)) - - signal.signal(signal.SIGALRM, pidfile_read_alarm_caller) - signal.alarm(self.timeout) - - content = '' - fh = None - - try: - fh = open(self.filename, 'r') - for line in fh.readlines(): - content += line - finally: - if fh: - fh.close() - signal.alarm(0) - - # Performing content of pidfile - - pid = None - line = content.strip() - match = re.search(r'^\s*(\d+)\s*$', line) - if match: - pid = int(match.group(1)) - else: - msg = _("No useful information found in pidfile {f!r}: {z!r}").format( - f=self.filename, z=line) - return True - - if self.verbose > 1: - LOG.debug(_("Trying check for process with PID {} ...").format(pid)) - - try: - os.kill(pid, 0) - except OSError as err: - if err.errno == errno.ESRCH: - LOG.info(_("Process with PID {} anonymous died.").format(pid)) - return True - elif err.errno == errno.EPERM: - error_tuple = sys.exc_info() - msg = _("No permission to signal the process {} ...").format(pid) - reraise(PidFileError, msg, error_tuple[2]) - else: - error_tuple = sys.exc_info() - msg = _("Got a {c}: {e}.").format(err.__class__.__name__, err) - reraise(PidFileError, msg, error_tuple[2]) - else: - raise PidFileInUseError(self.filename, pid) - - return False - - -# ============================================================================= - -if __name__ == "__main__": - - pass - -# ============================================================================= - -# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 list diff --git a/locale/de_DE/LC_MESSAGES/pp_admintools.po b/locale/de_DE/LC_MESSAGES/pp_admintools.po index d29c792..1201781 100644 --- a/locale/de_DE/LC_MESSAGES/pp_admintools.po +++ b/locale/de_DE/LC_MESSAGES/pp_admintools.po @@ -5,10 +5,10 @@ # msgid "" msgstr "" -"Project-Id-Version: pp_admintools 0.9.0\n" +"Project-Id-Version: pp_admintools 0.9.1\n" "Report-Msgid-Bugs-To: frank.brehm@pixelpark.com\n" -"POT-Creation-Date: 2022-03-31 18:12+0200\n" -"PO-Revision-Date: 2022-03-31 18:00+0100\n" +"POT-Creation-Date: 2022-04-01 14:31+0200\n" +"PO-Revision-Date: 2022-04-01 14:45+0100\n" "Last-Translator: Frank Brehm \n" "Language: de_DE\n" "Language-Team: de_DE \n" @@ -689,118 +689,6 @@ msgstr "Suche nach API-Schlüssel für PowerDNS-Instanz {!r} …" msgid "Found API key of PDNS instance {inst!r}: {key!r}." msgstr "Fand API-Schlüssel für PowerDNS-Instanz {inst!r}: {key!r}." -#: lib/pp_admintools/pidfile.py:72 -msgid "Invalid pidfile {f!r} given: {r}" -msgstr "Ungültige PID-Datei {f!r} übergeben: {r}" - -#: lib/pp_admintools/pidfile.py:75 -msgid "Invalid pidfile {!r} given." -msgstr "Ungültige PID-Datei {!r} übergeben." - -#: lib/pp_admintools/pidfile.py:104 -msgid "The pidfile {f!r} is currently in use by the application with the PID {p}." -msgstr "Die PID-Datei {f!r} is gegenwärtig durch die Anwendung mit der PID {p} in Verwendung." - -#: lib/pp_admintools/pidfile.py:174 -msgid "No filename given on initializing {} object." -msgstr "Kein Dateiname bei der Initialisierung des {}-Objektes übergeben." - -#: lib/pp_admintools/pidfile.py:292 -msgid "Pidfile {!r} doesn't exists, not removing." -msgstr "Die PID-Datei {!r} wird nicht gelöscht, da sie nicht existiert." - -#: lib/pp_admintools/pidfile.py:297 -msgid "Auto removing disabled, don't deleting {!r}." -msgstr "{!r} wird nicht gelöscht, da das automatisce Löschen deaktiviert ist." - -#: lib/pp_admintools/pidfile.py:301 -msgid "Removing pidfile {!r} ..." -msgstr "Lösche PID-Datei {!r} …" - -#: lib/pp_admintools/pidfile.py:304 lib/pp_admintools/pidfile.py:338 -msgid "Just kidding ..." -msgstr "Ich mach nur Spass …" - -#: lib/pp_admintools/pidfile.py:309 -msgid "Could not delete pidfile {f!r}: {e}" -msgstr "Konnte PID-Datei {f!r} nicht löschen: {e}" - -#: lib/pp_admintools/pidfile.py:328 -msgid "Invalid PID {p} for creating pidfile {f!r} given." -msgstr "Ungültige PID {p} beim Erstellen der PID-Datei {f!r} übergeben." - -#: lib/pp_admintools/pidfile.py:336 -msgid "Deleting pidfile {!r} ..." -msgstr "Lösche PID-Datei {!r} …" - -#: lib/pp_admintools/pidfile.py:346 -msgid "Trying opening {!r} exclusive ..." -msgstr "Versuche {!r} exklisiv zu öffnen …" - -#: lib/pp_admintools/pidfile.py:349 lib/pp_admintools/pidfile.py:401 -msgid "Simulation mode - don't real writing in {!r}." -msgstr "Simulationsmodus - schreibe nicht wirklich nach {!r}." - -#: lib/pp_admintools/pidfile.py:359 -msgid "Error on creating pidfile {f!r}: {e}" -msgstr "Fehler beim Erstellem der PID-Datei {f!r}: {e}" - -#: lib/pp_admintools/pidfile.py:363 lib/pp_admintools/pidfile.py:413 -msgid "Writing {p} into {f!r} ..." -msgstr "Schreibe {p} in {f!r} …" - -#: lib/pp_admintools/pidfile.py:385 -msgid "Calling {} on a not self created pidfile." -msgstr "Aufruf von {} bei einer nicht selbst erstellten PID-Datei." - -#: lib/pp_admintools/pidfile.py:398 -msgid "Trying opening {!r} for recreate ..." -msgstr "Versuche {!r} zum Wiederestellen zu öffnen …" - -#: lib/pp_admintools/pidfile.py:409 -msgid "Error on recreating pidfile {f!r}: {e}" -msgstr "Fehler beim Wiedererstellen der PID-Datei {f!r}: {e}" - -#: lib/pp_admintools/pidfile.py:442 -msgid "Pidfile parent directory {!r} doesn't exists." -msgstr "Das übergeordnete Verzeichnis {!r} der PID-Datei existiert nicht." - -#: lib/pp_admintools/pidfile.py:446 -msgid "Pidfile parent directory {!r} is not a directory." -msgstr "Das übergeordnete Verzeichnis {!r} der PID-Datei ist gar kein Verzeichnis." - -#: lib/pp_admintools/pidfile.py:450 -msgid "No write access to pidfile parent directory {!r}." -msgstr "Kein Schreibzugriff zum übergeordneten Verzeichnis {!r} der PID-Datei." - -#: lib/pp_admintools/pidfile.py:457 -msgid "It is not a regular file." -msgstr "Es ist keine reguläre Datei." - -#: lib/pp_admintools/pidfile.py:474 -msgid "Reading content of pidfile {!r} ..." -msgstr "Lese den Inhalt der PID-Datei {!r} …" - -#: lib/pp_admintools/pidfile.py:499 -msgid "No useful information found in pidfile {f!r}: {z!r}" -msgstr "Keine sinnvollen Informationen in der PID-Datei {f!r} gefunden: {z!r}" - -#: lib/pp_admintools/pidfile.py:504 -msgid "Trying check for process with PID {} ..." -msgstr "Versuche den Prozess mit der PID {} zu überprüfen …" - -#: lib/pp_admintools/pidfile.py:510 -msgid "Process with PID {} anonymous died." -msgstr "Der Prozess mit der PID {} is anonym verstorben." - -#: lib/pp_admintools/pidfile.py:514 -msgid "No permission to signal the process {} ..." -msgstr "Kein Recht, ein Signal dem Prozess {} zu senden …" - -#: lib/pp_admintools/pidfile.py:518 -msgid "Got a {c}: {e}." -msgstr "Erhielt ein(e) {c}: {e}." - #: lib/pp_admintools/xlate.py:97 msgid "Module directory: {!r}" msgstr "Modul-Verzeichnis: {!r}" diff --git a/locale/en_US/LC_MESSAGES/pp_admintools.po b/locale/en_US/LC_MESSAGES/pp_admintools.po index 376a12c..c5bee86 100644 --- a/locale/en_US/LC_MESSAGES/pp_admintools.po +++ b/locale/en_US/LC_MESSAGES/pp_admintools.po @@ -5,9 +5,9 @@ # msgid "" msgstr "" -"Project-Id-Version: pp_admintools 0.9.0\n" +"Project-Id-Version: pp_admintools 0.9.1\n" "Report-Msgid-Bugs-To: frank.brehm@pixelpark.com\n" -"POT-Creation-Date: 2022-03-31 18:12+0200\n" +"POT-Creation-Date: 2022-04-01 14:31+0200\n" "PO-Revision-Date: 2022-03-31 17:45+0100\n" "Last-Translator: Frank Brehm \n" "Language: en_US\n" @@ -682,118 +682,6 @@ msgstr "Searching for API key of PDNS instance {!r} …" msgid "Found API key of PDNS instance {inst!r}: {key!r}." msgstr "" -#: lib/pp_admintools/pidfile.py:72 -msgid "Invalid pidfile {f!r} given: {r}" -msgstr "" - -#: lib/pp_admintools/pidfile.py:75 -msgid "Invalid pidfile {!r} given." -msgstr "" - -#: lib/pp_admintools/pidfile.py:104 -msgid "The pidfile {f!r} is currently in use by the application with the PID {p}." -msgstr "" - -#: lib/pp_admintools/pidfile.py:174 -msgid "No filename given on initializing {} object." -msgstr "" - -#: lib/pp_admintools/pidfile.py:292 -msgid "Pidfile {!r} doesn't exists, not removing." -msgstr "" - -#: lib/pp_admintools/pidfile.py:297 -msgid "Auto removing disabled, don't deleting {!r}." -msgstr "" - -#: lib/pp_admintools/pidfile.py:301 -msgid "Removing pidfile {!r} ..." -msgstr "Removing pidfile {!r} …" - -#: lib/pp_admintools/pidfile.py:304 lib/pp_admintools/pidfile.py:338 -msgid "Just kidding ..." -msgstr "Just kidding …" - -#: lib/pp_admintools/pidfile.py:309 -msgid "Could not delete pidfile {f!r}: {e}" -msgstr "" - -#: lib/pp_admintools/pidfile.py:328 -msgid "Invalid PID {p} for creating pidfile {f!r} given." -msgstr "" - -#: lib/pp_admintools/pidfile.py:336 -msgid "Deleting pidfile {!r} ..." -msgstr "Deleting pidfile {!r} …" - -#: lib/pp_admintools/pidfile.py:346 -msgid "Trying opening {!r} exclusive ..." -msgstr "Trying opening {!r} exclusive …" - -#: lib/pp_admintools/pidfile.py:349 lib/pp_admintools/pidfile.py:401 -msgid "Simulation mode - don't real writing in {!r}." -msgstr "" - -#: lib/pp_admintools/pidfile.py:359 -msgid "Error on creating pidfile {f!r}: {e}" -msgstr "" - -#: lib/pp_admintools/pidfile.py:363 lib/pp_admintools/pidfile.py:413 -msgid "Writing {p} into {f!r} ..." -msgstr "Writing {p} into {f!r} …" - -#: lib/pp_admintools/pidfile.py:385 -msgid "Calling {} on a not self created pidfile." -msgstr "" - -#: lib/pp_admintools/pidfile.py:398 -msgid "Trying opening {!r} for recreate ..." -msgstr "Trying opening {!r} for recreate …" - -#: lib/pp_admintools/pidfile.py:409 -msgid "Error on recreating pidfile {f!r}: {e}" -msgstr "" - -#: lib/pp_admintools/pidfile.py:442 -msgid "Pidfile parent directory {!r} doesn't exists." -msgstr "" - -#: lib/pp_admintools/pidfile.py:446 -msgid "Pidfile parent directory {!r} is not a directory." -msgstr "" - -#: lib/pp_admintools/pidfile.py:450 -msgid "No write access to pidfile parent directory {!r}." -msgstr "" - -#: lib/pp_admintools/pidfile.py:457 -msgid "It is not a regular file." -msgstr "" - -#: lib/pp_admintools/pidfile.py:474 -msgid "Reading content of pidfile {!r} ..." -msgstr "Reading content of pidfile {!r} …" - -#: lib/pp_admintools/pidfile.py:499 -msgid "No useful information found in pidfile {f!r}: {z!r}" -msgstr "" - -#: lib/pp_admintools/pidfile.py:504 -msgid "Trying check for process with PID {} ..." -msgstr "Trying check for process with PID {} …" - -#: lib/pp_admintools/pidfile.py:510 -msgid "Process with PID {} anonymous died." -msgstr "" - -#: lib/pp_admintools/pidfile.py:514 -msgid "No permission to signal the process {} ..." -msgstr "No permission to signal the process {} …" - -#: lib/pp_admintools/pidfile.py:518 -msgid "Got a {c}: {e}." -msgstr "" - #: lib/pp_admintools/xlate.py:97 msgid "Module directory: {!r}" msgstr "" diff --git a/locale/pp_admintools.pot b/locale/pp_admintools.pot index 7dc6354..5d8a18c 100644 --- a/locale/pp_admintools.pot +++ b/locale/pp_admintools.pot @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: pp_admintools 0.9.0\n" +"Project-Id-Version: pp_admintools 0.9.1\n" "Report-Msgid-Bugs-To: frank.brehm@pixelpark.com\n" -"POT-Creation-Date: 2022-03-31 18:12+0200\n" +"POT-Creation-Date: 2022-04-01 14:31+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -678,118 +678,6 @@ msgstr "" msgid "Found API key of PDNS instance {inst!r}: {key!r}." msgstr "" -#: lib/pp_admintools/pidfile.py:72 -msgid "Invalid pidfile {f!r} given: {r}" -msgstr "" - -#: lib/pp_admintools/pidfile.py:75 -msgid "Invalid pidfile {!r} given." -msgstr "" - -#: lib/pp_admintools/pidfile.py:104 -msgid "The pidfile {f!r} is currently in use by the application with the PID {p}." -msgstr "" - -#: lib/pp_admintools/pidfile.py:174 -msgid "No filename given on initializing {} object." -msgstr "" - -#: lib/pp_admintools/pidfile.py:292 -msgid "Pidfile {!r} doesn't exists, not removing." -msgstr "" - -#: lib/pp_admintools/pidfile.py:297 -msgid "Auto removing disabled, don't deleting {!r}." -msgstr "" - -#: lib/pp_admintools/pidfile.py:301 -msgid "Removing pidfile {!r} ..." -msgstr "" - -#: lib/pp_admintools/pidfile.py:304 lib/pp_admintools/pidfile.py:338 -msgid "Just kidding ..." -msgstr "" - -#: lib/pp_admintools/pidfile.py:309 -msgid "Could not delete pidfile {f!r}: {e}" -msgstr "" - -#: lib/pp_admintools/pidfile.py:328 -msgid "Invalid PID {p} for creating pidfile {f!r} given." -msgstr "" - -#: lib/pp_admintools/pidfile.py:336 -msgid "Deleting pidfile {!r} ..." -msgstr "" - -#: lib/pp_admintools/pidfile.py:346 -msgid "Trying opening {!r} exclusive ..." -msgstr "" - -#: lib/pp_admintools/pidfile.py:349 lib/pp_admintools/pidfile.py:401 -msgid "Simulation mode - don't real writing in {!r}." -msgstr "" - -#: lib/pp_admintools/pidfile.py:359 -msgid "Error on creating pidfile {f!r}: {e}" -msgstr "" - -#: lib/pp_admintools/pidfile.py:363 lib/pp_admintools/pidfile.py:413 -msgid "Writing {p} into {f!r} ..." -msgstr "" - -#: lib/pp_admintools/pidfile.py:385 -msgid "Calling {} on a not self created pidfile." -msgstr "" - -#: lib/pp_admintools/pidfile.py:398 -msgid "Trying opening {!r} for recreate ..." -msgstr "" - -#: lib/pp_admintools/pidfile.py:409 -msgid "Error on recreating pidfile {f!r}: {e}" -msgstr "" - -#: lib/pp_admintools/pidfile.py:442 -msgid "Pidfile parent directory {!r} doesn't exists." -msgstr "" - -#: lib/pp_admintools/pidfile.py:446 -msgid "Pidfile parent directory {!r} is not a directory." -msgstr "" - -#: lib/pp_admintools/pidfile.py:450 -msgid "No write access to pidfile parent directory {!r}." -msgstr "" - -#: lib/pp_admintools/pidfile.py:457 -msgid "It is not a regular file." -msgstr "" - -#: lib/pp_admintools/pidfile.py:474 -msgid "Reading content of pidfile {!r} ..." -msgstr "" - -#: lib/pp_admintools/pidfile.py:499 -msgid "No useful information found in pidfile {f!r}: {z!r}" -msgstr "" - -#: lib/pp_admintools/pidfile.py:504 -msgid "Trying check for process with PID {} ..." -msgstr "" - -#: lib/pp_admintools/pidfile.py:510 -msgid "Process with PID {} anonymous died." -msgstr "" - -#: lib/pp_admintools/pidfile.py:514 -msgid "No permission to signal the process {} ..." -msgstr "" - -#: lib/pp_admintools/pidfile.py:518 -msgid "Got a {c}: {e}." -msgstr "" - #: lib/pp_admintools/xlate.py:97 msgid "Module directory: {!r}" msgstr "" -- 2.39.5