~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bundle/__init__.py

  • Committer: John Arbash Meinel
  • Date: 2006-07-07 16:41:38 UTC
  • mto: (1793.3.6 bundle-fixes)
  • mto: This revision was merged to the branch mainline in revision 1850.
  • Revision ID: john@arbash-meinel.com-20060707164138-f3b923459bc2e9fa
Handle the SFTP exception that you can't read() from the result of get() to a dir

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
        return read_bundle(f)
42
42
    except (errors.TransportError, errors.PathError), e:
43
43
        raise errors.NotABundle(str(e))
 
44
    except (IOError,), e:
 
45
        # jam 20060707
 
46
        # Abstraction leakage, SFTPTransport.get('directory')
 
47
        # doesn't always fail at get() time. Sometimes it fails
 
48
        # during read. And that raises a generic IOError with
 
49
        # just the string 'Failure'
 
50
        # StubSFTPServer does fail during get() (because of prefetch) 
 
51
        # so it has an opportunity to translate the error.
 
52
        raise errors.NotABundle(str(e))
44
53