~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/stub_sftp.py

  • Committer: Patch Queue Manager
  • Date: 2014-09-22 19:14:34 UTC
  • mfrom: (6598.1.2 bzr)
  • Revision ID: pqm@pqm.ubuntu.com-20140922191434-6bbnpnxi5jab4vim
(richard-wilbur) Allows launchpad APIs to use proxies by default(Paul Gear).
 (Paul Gear)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006, 2008, 2009, 2010 Robey Pointer <robey@lag.net>, Canonical Ltd
 
1
# Copyright (C) 2005, 2006, 2008-2011 Robey Pointer <robey@lag.net>, Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
21
21
 
22
22
import os
23
23
import paramiko
24
 
import select
25
24
import socket
26
25
import SocketServer
27
26
import sys
28
 
import threading
29
27
import time
30
28
 
31
29
from bzrlib import (
120
118
    else:
121
119
        def canonicalize(self, path):
122
120
            if os.path.isabs(path):
123
 
                return os.path.normpath(path)
 
121
                return osutils.normpath(path)
124
122
            else:
125
 
                return os.path.normpath('/' + os.path.join(self.home, path))
 
123
                return osutils.normpath('/' + os.path.join(self.home, path))
126
124
 
127
125
    def chattr(self, path, attr):
128
126
        try:
555
553
 
556
554
    def get_url(self):
557
555
        """See bzrlib.transport.Server.get_url."""
558
 
        return self._get_sftp_url("~/")
 
556
        return self._get_sftp_url("%7E/")
559
557
 
560
558
 
561
559
class SFTPSiblingAbsoluteServer(SFTPAbsoluteServer):