~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

Move all features to bzrlib.tests.features in 2.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
1770
1770
    _fmt = "Working tree has conflicts."
1771
1771
 
1772
1772
 
 
1773
class ConfigContentError(BzrError):
 
1774
 
 
1775
    _fmt = "Config file %(filename)s is not UTF-8 encoded\n"
 
1776
 
 
1777
    def __init__(self, filename):
 
1778
        BzrError.__init__(self)
 
1779
        self.filename = filename
 
1780
 
 
1781
 
1773
1782
class ParseConfigError(BzrError):
1774
1783
 
1775
1784
    _fmt = "Error(s) parsing config file %(filename)s:\n%(errors)s"
1791
1800
 
1792
1801
class SigningFailed(BzrError):
1793
1802
 
1794
 
    _fmt = 'Failed to gpg sign data with command "%(command_line)s"'
 
1803
    _fmt = 'Failed to GPG sign data with command "%(command_line)s"'
1795
1804
 
1796
1805
    def __init__(self, command_line):
1797
1806
        BzrError.__init__(self, command_line=command_line)
1798
1807
 
1799
1808
 
 
1809
class SignatureVerificationFailed(BzrError):
 
1810
 
 
1811
    _fmt = 'Failed to verify GPG signature data with error "%(error)s"'
 
1812
 
 
1813
    def __init__(self, error):
 
1814
        BzrError.__init__(self, error=error)
 
1815
 
 
1816
 
 
1817
class DependencyNotPresent(BzrError):
 
1818
 
 
1819
    _fmt = 'Unable to import library "%(library)s": %(error)s'
 
1820
 
 
1821
    def __init__(self, library, error):
 
1822
        BzrError.__init__(self, library=library, error=error)
 
1823
 
 
1824
 
 
1825
class GpgmeNotInstalled(DependencyNotPresent):
 
1826
 
 
1827
    _fmt = 'python-gpgme is not installed, it is needed to verify signatures'
 
1828
 
 
1829
    def __init__(self, error):
 
1830
        DependencyNotPresent.__init__(self, 'gpgme', error)
 
1831
 
 
1832
 
1800
1833
class WorkingTreeNotRevision(BzrError):
1801
1834
 
1802
1835
    _fmt = ("The working tree for %(basedir)s has changed since"
2055
2088
    _fmt = "Parameter %(param)s contains a newline."
2056
2089
 
2057
2090
 
2058
 
class DependencyNotPresent(BzrError):
2059
 
 
2060
 
    _fmt = 'Unable to import library "%(library)s": %(error)s'
2061
 
 
2062
 
    def __init__(self, library, error):
2063
 
        BzrError.__init__(self, library=library, error=error)
2064
 
 
2065
 
 
2066
2091
class ParamikoNotPresent(DependencyNotPresent):
2067
2092
 
2068
2093
    _fmt = "Unable to import paramiko (required for sftp support): %(error)s"