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

  • Committer: Mark Hammond
  • Date: 2008-08-09 05:00:06 UTC
  • mto: (3606.2.4 1.6)
  • mto: This revision was merged to the branch mainline in revision 3625.
  • Revision ID: mhammond@skippinet.com.au-20080809050006-5sf16g2b7eijnkwz
Correctly catch and handle os.listdir errors on Windows

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
 
17
import sys
17
18
import os
18
19
import errno
19
20
from stat import S_ISREG, S_IEXEC
636
637
        try:
637
638
            children = os.listdir(self._tree.abspath(path))
638
639
        except OSError, e:
639
 
            if e.errno not in (errno.ENOENT, errno.ESRCH, errno.ENOTDIR):
 
640
            # See comments in osutils regarding winerror etc.
 
641
            if ((e.errno not in (errno.ENOENT, errno.ESRCH, errno.ENOTDIR)) and
 
642
                (sys.platform!='win32' or e.errno not in (267, errno.EINVAL))):
640
643
                raise
641
644
            return
642
645