comparison hgext3rd/pullbundle.py @ 4807:ea8da5aa23c6

python3: add raw prefix to open()-like functions
author Rapha?l Gom?s <rgomes@octobus.net>
date Tue, 06 Aug 2019 11:32:01 +0200
parents 22ffbbba695d
children 48b30ff742cb
comparison
equal deleted inserted replaced
4806:44629ae21b84 4807:ea8da5aa23c6
434 # delay file opening as much as possible this introduce a small race 434 # delay file opening as much as possible this introduce a small race
435 # condition if someone remove the file before we actually use it. However 435 # condition if someone remove the file before we actually use it. However
436 # opening too many file will not work. 436 # opening too many file will not work.
437 437
438 def data(): 438 def data():
439 with open(bundlepath, 'rb') as fd: 439 with open(bundlepath, r'rb') as fd:
440 for chunk in util.filechunkiter(fd): 440 for chunk in util.filechunkiter(fd):
441 yield chunk 441 yield chunk
442 return data() 442 return data()
443 443
444 def cachewriter(repo, bundlename, stream): 444 def cachewriter(repo, bundlename, stream):