Rev 5056: (vila) Fix some sftp test server related failures in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Wed Feb 24 10:17:37 GMT 2010
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 5056 [merge]
revision-id: pqm at pqm.ubuntu.com-20100224101714-wy0vr6ldlrq7fdk7
parent: pqm at pqm.ubuntu.com-20100223082205-nn2nzonavf8sfuae
parent: v.ladeuil+lp at free.fr-20100224094448-vptzppsbdt7gz0q6
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Wed 2010-02-24 10:17:14 +0000
message:
(vila) Fix some sftp test server related failures
modified:
bzrlib/tests/stub_sftp.py stub_sftp.py-20051027032739-0e7ef4f7bab0e174
=== modified file 'bzrlib/tests/stub_sftp.py'
--- a/bzrlib/tests/stub_sftp.py 2010-02-23 07:43:11 +0000
+++ b/bzrlib/tests/stub_sftp.py 2010-02-24 09:41:32 +0000
@@ -297,14 +297,14 @@
threading.Thread(target=self._callback, args=(s,)).start()
except socket.error, x:
sys.excepthook(*sys.exc_info())
- warning('Socket error during accept() within unit test server'
- ' thread: %r' % x)
+ trace.warning('Socket error during accept() '
+ 'within unit test server thread: %r' % x)
except Exception, x:
# probably a failed test; unit test thread will log the
# failure/error
sys.excepthook(*sys.exc_info())
- warning('Exception from within unit test server thread: %r' %
- x)
+ trace.warning(
+ 'Exception from within unit test server thread: %r' % x)
class SocketDelay(object):
@@ -438,13 +438,15 @@
if not (backing_server is None or
isinstance(backing_server, test_server.LocalURLServer)):
raise AssertionError(
- "backing_server should not be %r, because this can only serve the "
- "local current working directory." % (backing_server,))
+ 'backing_server should not be %r, because this can only serve '
+ 'the local current working directory.' % (backing_server,))
self._original_vendor = ssh._ssh_vendor_manager._cached_ssh_vendor
ssh._ssh_vendor_manager._cached_ssh_vendor = self._vendor
+ # FIXME: the following block should certainly just be self._homedir =
+ # osutils.getcwd() but that fails badly on Unix -- vila 20100224
if sys.platform == 'win32':
# Win32 needs to use the UNICODE api
- self._homedir = getcwd()
+ self._homedir = os.getcwdu()
else:
# But Linux SFTP servers should just deal in bytestreams
self._homedir = os.getcwd()
More information about the bazaar-commits
mailing list