/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/tests/__init__.py

  • Committer: Vincent Ladeuil
  • Date: 2009-08-17 19:44:50 UTC
  • mto: (4624.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 4626.
  • Revision ID: v.ladeuil+lp@free.fr-20090817194450-1ajikzmjnw414xvt
Allows selftest to finish even without fully cleaning the test dir.

* bzrlib/tests/__init__.py:
(_rmtree_temp_dir): Don't fail if we can't remove the main test
dir.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3815
3815
    try:
3816
3816
        osutils.rmtree(dirname)
3817
3817
    except OSError, e:
3818
 
        if sys.platform == 'win32' and e.errno == errno.EACCES:
3819
 
            sys.stderr.write('Permission denied: '
3820
 
                             'unable to remove testing dir '
3821
 
                             '%s\n%s'
3822
 
                             % (os.path.basename(dirname), e))
3823
 
        else:
3824
 
            raise
 
3818
        # We don't want to fail here because some useful display will be lost
 
3819
        # otherwise. Polluting the tmp dir is bad, but not giving all the
 
3820
        # possible info to the test runner is even worse.
 
3821
        sys.stderr.write('Unable to remove testing dir %s\n%s'
 
3822
                         % (os.path.basename(dirname), e))
3825
3823
 
3826
3824
 
3827
3825
class Feature(object):