~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-09-16 02:23:41 UTC
  • mfrom: (2001.3.4 short_reads)
  • Revision ID: pqm@pqm.ubuntu.com-20060916022341-3d816fe2ecff52c1
(jam) raise ShortReadvError when we don't get back enough data

Show diffs side-by-side

added added

removed removed

Lines of Context:
286
286
        PathError.__init__(self, url, extra=extra)
287
287
 
288
288
 
 
289
class ShortReadvError(PathError):
 
290
    """readv() read %(actual)s bytes rather than %(length)s bytes at %(offset)s for %(path)s%(extra)s"""
 
291
 
 
292
    is_user_error = False
 
293
 
 
294
    def __init__(self, path, offset, length, actual, extra=None):
 
295
        PathError.__init__(self, path, extra=extra)
 
296
        self.offset = offset
 
297
        self.length = length
 
298
        self.actual = actual
 
299
 
 
300
 
289
301
class PathNotChild(BzrNewError):
290
302
    """Path %(path)r is not a child of path %(base)r%(extra)s"""
291
303