Created
December 13, 2013 02:30
-
-
Save portante/7939011 to your computer and use it in GitHub Desktop.
Possible patch to help https://review.openstack.org/61896 pass unscathed through hacking checks...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/swift/proxy/controllers/base.py b/swift/proxy/controllers/base.py | |
| index 066aece..6ea3637 100644 | |
| --- a/swift/proxy/controllers/base.py | |
| +++ b/swift/proxy/controllers/base.py | |
| @@ -29,7 +29,7 @@ import time | |
| import functools | |
| import inspect | |
| from sys import exc_info | |
| -from swift import gettext_ as _ | |
| +from swift import gettext_ as _, gettext_ | |
| from urllib import quote | |
| from eventlet import sleep | |
| @@ -49,6 +49,9 @@ from swift.common.http import is_informational, is_success, is_redirection, \ | |
| from swift.common.swob import Request, Response, HeaderKeyDict, Range, \ | |
| HTTPException, HTTPRequestedRangeNotSatisfiable | |
| +# This should ensure the "Object" string is in the translation database | |
| +_object_msg = _('Object') | |
| + | |
| def update_headers(response, headers): | |
| """ | |
| @@ -637,7 +640,7 @@ class GetOrHeadHandler(object): | |
| new_source, new_node = self._get_source_and_node() | |
| if new_source: | |
| self.app.exception_occurred( | |
| - node, _(self.server_type), | |
| + node, gettext_(self.server_type), | |
| _('Trying to read during GET (retrying)')) | |
| # Close-out the connection as best as possible. | |
| if getattr(source, 'swift_conn', None): | |
| @@ -670,7 +673,7 @@ class GetOrHeadHandler(object): | |
| sleep() | |
| except ChunkReadTimeout: | |
| - self.app.exception_occurred(node, _(self.server_type), | |
| + self.app.exception_occurred(node, gettext_(self.server_type), | |
| _('Trying to read during GET')) | |
| raise | |
| except ChunkWriteTimeout: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment