changeset 6330 | 4e836769d93c |
parent 6317 | b0d937869417 |
child 6339 | ed9b07a97587 |
--- a/mercurial/util.py Thu Mar 20 15:59:54 2008 -0500 +++ b/mercurial/util.py Thu Mar 20 22:41:40 2008 +0100 @@ -1000,7 +1000,8 @@ pass def set_binary(fd): - msvcrt.setmode(fd.fileno(), os.O_BINARY) + if hasattr(fd, 'fileno'): + msvcrt.setmode(fd.fileno(), os.O_BINARY) def pconvert(path): return '/'.join(splitpath(path))