mercurial/httppeer.py
changeset 36835 5bc7ff103081
parent 36430 efebfa9b4cab
child 36959 43815d87c6aa
equal deleted inserted replaced
36834:1527f40de3b3 36835:5bc7ff103081
   457         fp_ = None
   457         fp_ = None
   458         filename = None
   458         filename = None
   459         try:
   459         try:
   460             # dump bundle to disk
   460             # dump bundle to disk
   461             fd, filename = tempfile.mkstemp(prefix="hg-bundle-", suffix=".hg")
   461             fd, filename = tempfile.mkstemp(prefix="hg-bundle-", suffix=".hg")
   462             fh = os.fdopen(fd, pycompat.sysstr("wb"))
   462             fh = os.fdopen(fd, r"wb")
   463             d = fp.read(4096)
   463             d = fp.read(4096)
   464             while d:
   464             while d:
   465                 fh.write(d)
   465                 fh.write(d)
   466                 d = fp.read(4096)
   466                 d = fp.read(4096)
   467             fh.close()
   467             fh.close()