~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/textfile.py

  • Committer: John Arbash Meinel
  • Date: 2006-05-30 04:44:48 UTC
  • mto: (1711.2.26 jam-integration)
  • mto: This revision was merged to the branch mainline in revision 1734.
  • Revision ID: john@arbash-meinel.com-20060530044448-81612e2e57c3991f
Update documentation and TODO for compare_trees

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006 Canonical Ltd
 
1
# Copyright (C) 2006 by Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
46
46
    """Check whether the supplied path is a text, not binary file.
47
47
    Raise BinaryFile if a NUL occurs in the first 1024 bytes.
48
48
    """
49
 
    f = open(path, 'rb')
50
 
    try:
51
 
        text_file(f)
52
 
    finally:
53
 
        f.close()
 
49
    text_file(open(path, 'rb'))