/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

Merge from bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
658
658
 
659
659
class LockError(BzrError):
660
660
 
661
 
    _fmt = "Lock error: %(message)s"
 
661
    _fmt = "Lock error: %(msg)s"
662
662
 
663
663
    internal_error = True
664
664
 
668
668
    #
669
669
    # New code should prefer to raise specific subclasses
670
670
    def __init__(self, message):
671
 
        self.message = message
 
671
        # Python 2.5 uses a slot for StandardError.message,
 
672
        # so use a different variable name
 
673
        # so it is exposed in self.__dict__
 
674
        self.msg = message
672
675
 
673
676
 
674
677
class LockActive(LockError):
708
711
        self.obj = obj
709
712
 
710
713
 
 
714
class ReadOnlyLockError(LockError):
 
715
 
 
716
    _fmt = "Cannot acquire write lock on %(fname)s. %(msg)s"
 
717
 
 
718
    def __init__(self, fname, msg):
 
719
        LockError.__init__(self, '')
 
720
        self.fname = fname
 
721
        self.msg = msg
 
722
 
 
723
 
711
724
class OutSideTransaction(BzrError):
712
725
 
713
726
    _fmt = ("A transaction related operation was attempted after"
748
761
    # bits?
749
762
 
750
763
    internal_error = False
751
 
    
 
764
 
752
765
    def __init__(self, lock):
753
766
        self.lock = lock
754
767
 
1908
1921
        self.name = name
1909
1922
 
1910
1923
 
 
1924
class NotAMergeDirective(BzrError):
 
1925
    """File starting with %(firstline)r is not a merge directive"""
 
1926
    def __init__(self, firstline):
 
1927
        BzrError.__init__(self, firstline=firstline)
 
1928
 
 
1929
 
1911
1930
class NoMergeSource(BzrError):
1912
1931
    """Raise if no merge source was specified for a merge directive"""
1913
1932