Rev 5056: Fix bug #526221 and #526353. in file:///home/vila/src/bzr/bugs/526221-failing-sftp-tests/

Vincent Ladeuil v.ladeuil+lp at free.fr
Tue Feb 23 13:14:48 GMT 2010


At file:///home/vila/src/bzr/bugs/526221-failing-sftp-tests/

------------------------------------------------------------
revno: 5056
revision-id: v.ladeuil+lp at free.fr-20100223131447-w3dy3jelyiguaod4
parent: pqm at pqm.ubuntu.com-20100223082205-nn2nzonavf8sfuae
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 526221-failing-sftp-tests
timestamp: Tue 2010-02-23 14:14:47 +0100
message:
  Fix bug #526221 and #526353.
  
  * bzrlib/tests/stub_sftp.py:
  (SocketListener.run): Fix fallout from refactoring deleting the
  import.
  (SFTPServer.start_server): All othe win32 usages use getcwdu().
-------------- next part --------------
=== 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-23 13:14:47 +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):
@@ -444,7 +444,7 @@
         ssh._ssh_vendor_manager._cached_ssh_vendor = self._vendor
         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