~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/osutils.py

  • Committer: Vincent Ladeuil
  • Date: 2007-10-23 07:15:13 UTC
  • mfrom: (2926 +trunk)
  • mto: (2961.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 2962.
  • Revision ID: v.ladeuil+lp@free.fr-20071023071513-elryt6g2at34d2ur
merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
593
593
def sha_file_by_name(fname):
594
594
    """Calculate the SHA1 of a file by reading the full text"""
595
595
    s = sha.new()
596
 
    f = os.open(fname, os.O_RDONLY)
 
596
    f = os.open(fname, os.O_RDONLY | O_BINARY)
597
597
    try:
598
598
        while True:
599
599
            b = os.read(f, 1<<16)