~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/http/response.py

  • Committer: Jelmer Vernooij
  • Date: 2012-07-02 18:21:51 UTC
  • mfrom: (6531 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6535.
  • Revision ID: jelmer@samba.org-20120702182151-zk9utamutjtjhipq
mergeĀ lp:bzr

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
        self._pos += len(data)
67
67
        return data
68
68
 
 
69
    def readline(self):
 
70
        data = self._file.readline()
 
71
        self._pos += len(data)
 
72
        return data
 
73
 
 
74
    def tell(self):
 
75
        return self._pos
 
76
 
69
77
    def seek(self, offset, whence=os.SEEK_SET):
70
78
        if whence == os.SEEK_SET:
71
79
            if offset < self._pos:
72
 
                raise AsserttionError(
 
80
                raise AssertionError(
73
81
                    "Can't seek backwards, pos: %s, offset: %s"
74
 
                    % (self._pos, offfset))
 
82
                    % (self._pos, offset))
75
83
            to_discard = offset - self._pos
76
84
        elif whence == os.SEEK_CUR:
77
85
            to_discard = offset