/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/osutils.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-11-10 23:58:42 UTC
  • mfrom: (2131.1.1 jam-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20061110235842-b15016f7ab574f5f
(Henri Wiechers) Update osutils.rmtree for changes in Windows python 2.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
332
332
        """Error handler for shutil.rmtree function [for win32]
333
333
        Helps to remove files and dirs marked as read-only.
334
334
        """
335
 
        type_, value = excinfo[:2]
 
335
        exception = excinfo[1]
336
336
        if function in (os.remove, os.rmdir) \
337
 
            and type_ == OSError \
338
 
            and value.errno == errno.EACCES:
 
337
            and isinstance(exception, OSError) \
 
338
            and exception.errno == errno.EACCES:
339
339
            make_writable(path)
340
340
            function(path)
341
341
        else: