/breezy/unstable

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy/unstable

« back to all changes in this revision

Viewing changes to breezy/clean_tree.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-24 01:39:33 UTC
  • mfrom: (3815.3776.6)
  • Revision ID: jelmer@jelmer.uk-20170524013933-ir4y4tqtrsiz2ka2
New upstream snapshot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
import os
21
21
import shutil
22
22
 
23
 
from bzrlib import (
 
23
from . import (
24
24
    controldir,
25
25
    errors,
26
26
    ui,
27
27
    )
28
 
from bzrlib.osutils import isdir
29
 
from bzrlib.trace import note
30
 
from bzrlib.workingtree import WorkingTree
31
 
from bzrlib.i18n import gettext
 
28
from .osutils import isdir
 
29
from .trace import note
 
30
from .workingtree import WorkingTree
 
31
from .i18n import gettext
32
32
 
33
33
def is_detritus(subp):
34
34
    """Return True if the supplied path is detritus, False otherwise"""
117
117
                try:
118
118
                    os.unlink(path)
119
119
                    note('  ' + subp)
120
 
                except OSError, e:
 
120
                except OSError as e:
121
121
                    # We handle only permission error here
122
122
                    if e.errno != errno.EACCES:
123
123
                        raise e