/usr/lib/python2.7/dist-packages/tmuxp/exc.py is in python-tmuxp 1.3.5-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | # -*- coding: utf-8 -*-
"""Exceptions for tmuxp.
tmuxp.exc
~~~~~~~~~
"""
from __future__ import (absolute_import, division, print_function,
unicode_literals, with_statement)
from ._compat import implements_to_string
class TmuxpException(Exception):
"""Base Exception for Tmuxp Errors."""
class ConfigError(TmuxpException):
"""Error parsing tmuxp configuration dict."""
pass
class EmptyConfigException(ConfigError):
"""Configuration is empty."""
pass
class BeforeLoadScriptNotExists(OSError):
def __init__(self, *args, **kwargs):
super(BeforeLoadScriptNotExists, self).__init__(*args, **kwargs)
self.strerror = (
"before_script file '%s' doesn't exist." % self.strerror
)
@implements_to_string
class BeforeLoadScriptError(Exception):
"""Exception replacing :py:class:`subprocess.CalledProcessError` for
:meth:`util.run_before_script`.
"""
def __init__(self, returncode, cmd, output=None):
self.returncode = returncode
self.cmd = cmd
self.output = output
self.message = (
'before_script failed with returncode {returncode}.\n'
'command: {cmd}\n'
'Error output:\n'
'{output}'
).format(returncode=self.returncode, cmd=self.cmd, output=self.output)
def __str__(self):
return self.message
|