~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/weavefile.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-09-20 23:46:41 UTC
  • mfrom: (2024.1.2 stop-iteration-46871)
  • Revision ID: pqm@pqm.ubuntu.com-20060920234641-daa0e6db0263b590
(jam) fix StopIteration error: bug #46871

Show diffs side-by-side

added added

removed removed

Lines of Context:
124
124
 
125
125
    lines = iter(f.readlines())
126
126
    
127
 
    l = lines.next()
 
127
    try:
 
128
        l = lines.next()
 
129
    except StopIteration:
 
130
        raise WeaveFormatError('invalid weave file: no header')
 
131
 
128
132
    if l != FORMAT_1:
129
133
        raise WeaveFormatError('invalid weave file header: %r' % l)
130
134