~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/osutils.py

  • Committer: Aaron Bentley
  • Date: 2005-12-26 00:11:10 UTC
  • mto: (1185.67.11 bzr.revision-storage)
  • mto: This revision was merged to the branch mainline in revision 1550.
  • Revision ID: aaron.bentley@utoronto.ca-20051226001110-cf590f668a99ba1a
Refactored a bit

Show diffs side-by-side

added added

removed removed

Lines of Context:
248
248
        tofile.write(b)
249
249
 
250
250
 
 
251
def file_iterator(input_file, readsize=32768):
 
252
    while True:
 
253
        b = input_file.read(readsize)
 
254
        if len(b) == 0:
 
255
            break
 
256
        yield b
 
257
 
 
258
 
251
259
def sha_file(f):
252
260
    if hasattr(f, 'tell'):
253
261
        assert f.tell() == 0