/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 breezy/errors.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-08-22 00:34:58 UTC
  • mfrom: (7067.12.5 python3-atomic)
  • Revision ID: breezy.the.bot@gmail.com-20180822003458-t8a5tmvru4yq9ou2
Fix an ignore test on Python 3.

Make AtomicFile a context manager.

Merged from https://code.launchpad.net/~jelmer/brz/python3-atomic/+merge/353125

Show diffs side-by-side

added added

removed removed

Lines of Context:
560
560
(use brz checkout if you wish to build a working tree): "%(path)s"'
561
561
 
562
562
 
563
 
class AtomicFileAlreadyClosed(PathError):
564
 
 
565
 
    _fmt = ('"%(function)s" called on an AtomicFile after it was closed:'
566
 
            ' "%(path)s"')
567
 
 
568
 
    def __init__(self, path, function):
569
 
        PathError.__init__(self, path=path, extra=None)
570
 
        self.function = function
571
 
 
572
 
 
573
563
class InaccessibleParent(PathError):
574
564
 
575
565
    _fmt = ('Parent not accessible given base "%(base)s" and'