Bug 1075090 -- Fixing log messages in python source code to support internationalization.

Change-Id: I6b50abaa82effad8feaaac8d85086ca8b5d42590
This commit is contained in:
Nachiappan VR N
2012-11-14 10:01:59 -08:00
parent 75277cf1ae
commit 84a0b2df59
15 changed files with 80 additions and 72 deletions

View File

@@ -121,7 +121,7 @@ class Ec2Signer(object):
def _calc_signature_2(self, params, verb, server_string, path):
"""Generate AWS signature version 2 string."""
LOG.debug('using _calc_signature_2')
LOG.debug(_('using _calc_signature_2'))
string_to_sign = '%s\n%s\n%s\n' % (verb, server_string, path)
if self.hmac_256:
current_hmac = self.hmac_256
@@ -137,13 +137,13 @@ class Ec2Signer(object):
val = urllib.quote(val, safe='-_~')
pairs.append(urllib.quote(key, safe='') + '=' + val)
qs = '&'.join(pairs)
LOG.debug('query string: %s', qs)
LOG.debug(_('query string: %s'), qs)
string_to_sign += qs
LOG.debug('string_to_sign: %s', string_to_sign)
LOG.debug(_('string_to_sign: %s'), string_to_sign)
current_hmac.update(string_to_sign)
b64 = base64.b64encode(current_hmac.digest())
LOG.debug('len(b64)=%d', len(b64))
LOG.debug('base64 encoded digest: %s', b64)
LOG.debug(_('len(b64)=%d'), len(b64))
LOG.debug(_('base64 encoded digest: %s'), b64)
return b64