Mercurial > public > mercurial-scm > hg
comparison mercurial/windows.py @ 9452:812b812ce8cf
Merge with crew-stable
author | Steve Borho <steve@borho.org> |
---|---|
date | Tue, 15 Sep 2009 11:18:12 -0500 |
parents | 40196d036a71 bc6b0fef9495 |
children | 8b8920209317 012f1244cd4c |
comparison
equal
deleted
inserted
replaced
9446:57d682d7d2da | 9452:812b812ce8cf |
---|---|
15 # wrap osutil.posixfile to provide friendlier exceptions | 15 # wrap osutil.posixfile to provide friendlier exceptions |
16 def posixfile(name, mode='r', buffering=-1): | 16 def posixfile(name, mode='r', buffering=-1): |
17 try: | 17 try: |
18 return osutil.posixfile(name, mode, buffering) | 18 return osutil.posixfile(name, mode, buffering) |
19 except WindowsError, err: | 19 except WindowsError, err: |
20 raise IOError(err.errno, err.strerror) | 20 raise IOError(err.errno, '%s: %s' % (name, err.strerror)) |
21 posixfile.__doc__ = osutil.posixfile.__doc__ | 21 posixfile.__doc__ = osutil.posixfile.__doc__ |
22 | 22 |
23 class winstdout(object): | 23 class winstdout(object): |
24 '''stdout on windows misbehaves if sent through a pipe''' | 24 '''stdout on windows misbehaves if sent through a pipe''' |
25 | 25 |