Rev 6198: Use gettext on the new trace.note/warning lines. in http://bazaar.launchpad.net/~jameinel/bzr/2.5-soft-hangup-795025

John Arbash Meinel john at arbash-meinel.com
Mon Sep 26 07:58:36 UTC 2011


At http://bazaar.launchpad.net/~jameinel/bzr/2.5-soft-hangup-795025

------------------------------------------------------------
revno: 6198
revision-id: john at arbash-meinel.com-20110926075826-jd7vv1a9cmpe7fg9
parent: john at arbash-meinel.com-20110926075605-czuukdiawz68dpbd
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.5-soft-hangup-795025
timestamp: Mon 2011-09-26 09:58:26 +0200
message:
  Use gettext on the new trace.note/warning lines.
-------------- next part --------------
=== modified file 'bzrlib/smart/server.py'
--- a/bzrlib/smart/server.py	2011-09-26 07:56:05 +0000
+++ b/bzrlib/smart/server.py	2011-09-26 07:58:26 +0000
@@ -170,7 +170,7 @@
         #      Which means that while in-theory this is a graceful shutdown,
         #      because we don't actively close the connections, etc, we don't
         #      have a good way (yet) to poll the spawned clients and
-        trace.note('Requested to stop gracefully')
+        trace.note(gettext('Requested to stop gracefully'))
         self._should_terminate = True
         self._gracefully_stopping = True
         for handler, _ in self._active_connections:
@@ -180,13 +180,13 @@
         self._poll_active_connections()
         if not self._active_connections:
             return
-        trace.note('Waiting for %d client(s) to finish'
+        trace.note(gettext('Waiting for %d client(s) to finish')
                    % (len(self._active_connections),))
         t_next_log = self._timer() + self._LOG_WAITING_TIMEOUT
         while self._active_connections:
             now = self._timer()
             if now >= t_next_log:
-                trace.note('Still waiting for %d client(s) to finish'
+                trace.note(gettext('Still waiting for %d client(s) to finish')
                            % (len(self._active_connections),))
                 t_next_log = now + self._LOG_WAITING_TIMEOUT
             self._poll_active_connections(self._SHUTDOWN_POLL_TIMEOUT)
@@ -219,7 +219,8 @@
                         # we might get a EBADF here, any other socket errors
                         # should get logged.
                         if e.args[0] not in (errno.EBADF, errno.EINTR):
-                            trace.warning("listening socket error: %s", e)
+                            trace.warning(gettext("listening socket error: %s")
+                                          % (e,))
                     else:
                         if self._should_terminate:
                             conn.close()



More information about the bazaar-commits mailing list