# Own modules
-from .errors import ReadTimeoutError
+from .error import ReadTimeoutError
from .obj import PpBaseObjectError
from .obj import PpBaseObject
from .common import to_utf8
-__version__ = '0.2.3'
+__version__ = '0.2.4'
LOG = logging.getLogger(__name__)
)
if not filename:
- raise ValueError(_('No filename given on initializing PidFile object.'))
+ raise ValueError('No filename given on initializing PidFile object.')
self._filename = os.path.abspath(str(filename))
"""
@raise InvalidPidFileError: if the pidfile is unusable
@raise PidFileInUseError: if the pidfile is in use by another application
- @raise PbReadTimeoutError: on timeout reading an existing pidfile
+ @raise ReadTimeoutError: on timeout reading an existing pidfile
@raise OSError: on some other reasons, why the existing pidfile
couldn't be read
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)
+ 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)
+ 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)
+ reason = "No write access to pidfile parent directory {!r}.".format(
+ self.parent_dir)
raise InvalidPidFileError(self.filename, reason)
return False
@type sigframe: object
"""
- return PbReadTimeoutError(self.timeout, self.filename)
+ return ReadTimeoutError(self.timeout, self.filename)
if self.verbose > 1:
LOG.debug("Reading content of pidfile {!r} ...".format(self.filename))