summaryrefslogtreecommitdiff
path: root/nova/virt/disk/mount/api.py
diff options
context:
space:
mode:
authorMike Durnosvistov <mdurnosvistov@mirantis.com>2014-09-18 13:08:37 +0300
committerMike Durnosvistov <mdurnosvistov@mirantis.com>2014-11-20 10:19:17 +0200
commit8431670ef8d4dc59b0aa7a7263cc871e48150b87 (patch)
tree71d63e1a7909ac16f6a87db0c625289286a21ea3 /nova/virt/disk/mount/api.py
parentb32ccb7b415137dfb450ee9d0cfd5992e2941370 (diff)
Replacement `_` on `_LI` in all LOG.info - part 1
oslo.i18n uses different marker functions to separate the translatable messages into different catalogs, which the translation teams can prioritize translating. For details, please refer to: http://docs.openstack.org/developer/oslo.i18n/guidelines.html#guidelines-for-use-in-openstack There were not marker fuctions some places in directory network. This commit makes changes: * Add missing marker functions * Use ',' instead of '%' while adding variables to log messages Added a hacking rule for the log info about checking translation for it. Change-Id: I96766d723b01082339876ed94bbaa77783322b8c
Notes
Notes (review): Verified+2: Jenkins Code-Review+2: Jay Pipes <jaypipes@gmail.com> Workflow+1: Jay Pipes <jaypipes@gmail.com> Code-Review+2: Ken'ichi Ohmichi <ken1ohmichi@gmail.com> Verified+1: DB Datasets CI <turbo-hipster@lists.rcbops.com> Verified+1: Citrix XenServer CI Submitted-by: Jenkins Submitted-at: Thu, 20 Nov 2014 15:21:38 +0000 Reviewed-on: https://review.openstack.org/123459 Project: openstack/nova Branch: refs/heads/master
Diffstat (limited to 'nova/virt/disk/mount/api.py')
-rw-r--r--nova/virt/disk/mount/api.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/nova/virt/disk/mount/api.py b/nova/virt/disk/mount/api.py
index 31dcb04..dbf54db 100644
--- a/nova/virt/disk/mount/api.py
+++ b/nova/virt/disk/mount/api.py
@@ -18,7 +18,7 @@ import time
18 18
19from oslo.utils import importutils 19from oslo.utils import importutils
20 20
21from nova.i18n import _ 21from nova.i18n import _, _LI
22from nova.openstack.common import log as logging 22from nova.openstack.common import log as logging
23from nova import utils 23from nova import utils
24 24
@@ -118,7 +118,7 @@ class Mount(object):
118 start_time = time.time() 118 start_time = time.time()
119 device = self._inner_get_dev() 119 device = self._inner_get_dev()
120 while not device: 120 while not device:
121 LOG.info(_('Device allocation failed. Will retry in 2 seconds.')) 121 LOG.info(_LI('Device allocation failed. Will retry in 2 seconds.'))
122 time.sleep(2) 122 time.sleep(2)
123 if time.time() - start_time > MAX_DEVICE_WAIT: 123 if time.time() - start_time > MAX_DEVICE_WAIT:
124 LOG.warn(_('Device allocation failed after repeated retries.')) 124 LOG.warn(_('Device allocation failed after repeated retries.'))