~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/textfile.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-09-17 21:19:56 UTC
  • mfrom: (1997.1.6 bind-does-not-push-or-pull)
  • Revision ID: pqm@pqm.ubuntu.com-20060917211956-6e30d07da410fd1a
(Robert Collins) Change the Branch bind method to just bind rather than binding and pushing (fixes #43744 and #39542)

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
 
    text_file(open(path, 'rb'))
 
49
    f = open(path, 'rb')
 
50
    try:
 
51
        text_file(f)
 
52
    finally:
 
53
        f.close()