/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/textfile.py

  • Committer: Jelmer Vernooij
  • Date: 2018-05-06 11:48:54 UTC
  • mto: This revision was merged to the branch mainline in revision 6960.
  • Revision ID: jelmer@jelmer.uk-20180506114854-h4qd9ojaqy8wxjsd
Move .mailmap to root.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
    BinaryFile is raised if the file contains a NUL in the first 1024 bytes.
31
31
    """
32
32
    first_chunk = input.read(1024)
33
 
    if b'\x00' in first_chunk:
 
33
    if '\x00' in first_chunk:
34
34
        raise BinaryFile()
35
35
    return IterableFile(chain((first_chunk,), file_iterator(input)))
36
36
 
40
40
    Only the first 1024 characters are checked.
41
41
    """
42
42
    f = IterableFile(lines)
43
 
    if b'\x00' in f.read(1024):
 
43
    if '\x00' in f.read(1024):
44
44
        raise BinaryFile()
45
45
 
46
46