~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/stub_sftp.py

  • Committer: Michael Hudson
  • Date: 2007-11-26 13:45:49 UTC
  • mto: (3008.1.10 tree-less-merge-diffs)
  • mto: This revision was merged to the branch mainline in revision 3189.
  • Revision ID: michael.hudson@canonical.com-20071126134549-8l3hqyg2bie5yqdv
extract merger creation into a method

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
        if home is None:
72
72
            self.home = ''
73
73
        else:
74
 
            if not home.startswith(self.root):
75
 
                raise AssertionError(
76
 
                    "home must be a subdirectory of root (%s vs %s)"
77
 
                    % (home, root))
 
74
            assert home.startswith(self.root), \
 
75
                    "home must be a subdirectory of root (%s vs %s)" \
 
76
                    % (home, root)
78
77
            self.home = home[len(self.root):]
79
78
        if self.home.startswith('/'):
80
79
            self.home = self.home[1:]