Skip to content

Commit 98b92f9

Browse files
author
Ghe Rivero
committed
Sync from oslo.incubator
Update imports from oslo.incubator and remove old modules no longer used. Change-Id: Ibb71a7287f46709bb76c3dac5ce4be7a2f4818a3
1 parent 17067b9 commit 98b92f9

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

ironic_python_agent/openstack/common/_i18n.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
"""
1818

1919
try:
20-
import oslo.i18n
20+
import oslo_i18n
2121

2222
# NOTE(dhellmann): This reference to o-s-l-o will be replaced by the
2323
# application name when this module is synced into the separate
2424
# repository. It is OK to have more than one translation function
2525
# using the same domain, since there will still only be one message
2626
# catalog.
27-
_translators = oslo.i18n.TranslatorFactory(domain='ironic_python_agent')
27+
_translators = oslo_i18n.TranslatorFactory(domain='ironic_python_agent')
2828

2929
# The primary translation function using the well-known name "_"
3030
_ = _translators.primary
@@ -40,6 +40,6 @@
4040
_LC = _translators.log_critical
4141
except ImportError:
4242
# NOTE(dims): Support for cases where a project wants to use
43-
# code from ironic_python_agent-incubator, but is not ready to be internationalized
43+
# code from oslo-incubator, but is not ready to be internationalized
4444
# (like tempest)
4545
_ = _LI = _LW = _LE = _LC = lambda x: x

ironic_python_agent/openstack/common/loopingcall.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
# License for the specific language governing permissions and limitations
1616
# under the License.
1717

18+
import logging
1819
import sys
1920
import time
2021

2122
from eventlet import event
2223
from eventlet import greenthread
2324

2425
from ironic_python_agent.openstack.common._i18n import _LE, _LW
25-
from ironic_python_agent.openstack.common import log as logging
2626

2727
LOG = logging.getLogger(__name__)
2828

@@ -84,9 +84,9 @@ def _inner():
8484
break
8585
delay = end - start - interval
8686
if delay > 0:
87-
LOG.warn(_LW('task %(func_name)s run outlasted '
87+
LOG.warn(_LW('task %(func_name)r run outlasted '
8888
'interval by %(delay).2f sec'),
89-
{'func_name': repr(self.f), 'delay': delay})
89+
{'func_name': self.f, 'delay': delay})
9090
greenthread.sleep(-delay if delay < 0 else 0)
9191
except LoopingCallDone as e:
9292
self.stop()
@@ -127,9 +127,9 @@ def _inner():
127127

128128
if periodic_interval_max is not None:
129129
idle = min(idle, periodic_interval_max)
130-
LOG.debug('Dynamic looping call %(func_name)s sleeping '
130+
LOG.debug('Dynamic looping call %(func_name)r sleeping '
131131
'for %(idle).02f seconds',
132-
{'func_name': repr(self.f), 'idle': idle})
132+
{'func_name': self.f, 'idle': idle})
133133
greenthread.sleep(idle)
134134
except LoopingCallDone as e:
135135
self.stop()

0 commit comments

Comments
 (0)