From bffcb9a1efab9ae007e11b2086c8304494b34849 Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Thu, 19 Feb 2015 16:40:55 +0100 Subject: [PATCH] Use less verbose imports for i18n Change-Id: I969327d239d3df71cbd48bb4dfed0579b1dc9ab8 --- ironic_discoverd/introspect.py | 4 +--- ironic_discoverd/main.py | 4 +--- ironic_discoverd/node_cache.py | 4 +--- ironic_discoverd/plugins/edeploy.py | 3 +-- ironic_discoverd/plugins/root_device_hint.py | 3 +-- ironic_discoverd/plugins/standard.py | 4 +--- ironic_discoverd/process.py | 4 +--- tox.ini | 2 +- 8 files changed, 8 insertions(+), 20 deletions(-) diff --git a/ironic_discoverd/introspect.py b/ironic_discoverd/introspect.py index 0ece9a2b2..d8ba69626 100644 --- a/ironic_discoverd/introspect.py +++ b/ironic_discoverd/introspect.py @@ -19,9 +19,7 @@ import string import eventlet from ironicclient import exceptions -from ironic_discoverd.common.i18n import _ -from ironic_discoverd.common.i18n import _LI -from ironic_discoverd.common.i18n import _LW +from ironic_discoverd.common.i18n import _, _LI, _LW from ironic_discoverd import conf from ironic_discoverd import firewall from ironic_discoverd import node_cache diff --git a/ironic_discoverd/main.py b/ironic_discoverd/main.py index 669b44992..73dd262ca 100644 --- a/ironic_discoverd/main.py +++ b/ironic_discoverd/main.py @@ -23,9 +23,7 @@ import sys import flask from keystoneclient import exceptions -from ironic_discoverd.common.i18n import _ -from ironic_discoverd.common.i18n import _LE -from ironic_discoverd.common.i18n import _LW +from ironic_discoverd.common.i18n import _, _LE, _LW from ironic_discoverd import conf from ironic_discoverd import firewall from ironic_discoverd import introspect diff --git a/ironic_discoverd/node_cache.py b/ironic_discoverd/node_cache.py index a1b48c6c2..06b4c19dc 100644 --- a/ironic_discoverd/node_cache.py +++ b/ironic_discoverd/node_cache.py @@ -21,9 +21,7 @@ import sqlite3 import sys import time -from ironic_discoverd.common.i18n import _ -from ironic_discoverd.common.i18n import _LC -from ironic_discoverd.common.i18n import _LE +from ironic_discoverd.common.i18n import _, _LC, _LE from ironic_discoverd import conf from ironic_discoverd import utils diff --git a/ironic_discoverd/plugins/edeploy.py b/ironic_discoverd/plugins/edeploy.py index b44077749..5f41f454a 100644 --- a/ironic_discoverd/plugins/edeploy.py +++ b/ironic_discoverd/plugins/edeploy.py @@ -22,8 +22,7 @@ import logging from hardware import matcher from hardware import state -from ironic_discoverd.common.i18n import _ -from ironic_discoverd.common.i18n import _LW +from ironic_discoverd.common.i18n import _, _LW from ironic_discoverd import conf from ironic_discoverd.plugins import base from ironic_discoverd import utils diff --git a/ironic_discoverd/plugins/root_device_hint.py b/ironic_discoverd/plugins/root_device_hint.py index de9c46e21..9a7e29d69 100644 --- a/ironic_discoverd/plugins/root_device_hint.py +++ b/ironic_discoverd/plugins/root_device_hint.py @@ -15,8 +15,7 @@ import logging -from ironic_discoverd.common.i18n import _LI -from ironic_discoverd.common.i18n import _LW +from ironic_discoverd.common.i18n import _LI, _LW from ironic_discoverd.plugins import base diff --git a/ironic_discoverd/plugins/standard.py b/ironic_discoverd/plugins/standard.py index 64d92fa4b..4b2b57a42 100644 --- a/ironic_discoverd/plugins/standard.py +++ b/ironic_discoverd/plugins/standard.py @@ -15,9 +15,7 @@ import logging -from ironic_discoverd.common.i18n import _ -from ironic_discoverd.common.i18n import _LI -from ironic_discoverd.common.i18n import _LW +from ironic_discoverd.common.i18n import _, _LI, _LW from ironic_discoverd import conf from ironic_discoverd.plugins import base from ironic_discoverd import utils diff --git a/ironic_discoverd/process.py b/ironic_discoverd/process.py index e5b9bbf86..828a5886c 100644 --- a/ironic_discoverd/process.py +++ b/ironic_discoverd/process.py @@ -19,9 +19,7 @@ import time import eventlet from ironicclient import exceptions -from ironic_discoverd.common.i18n import _ -from ironic_discoverd.common.i18n import _LI -from ironic_discoverd.common.i18n import _LW +from ironic_discoverd.common.i18n import _, _LI, _LW from ironic_discoverd import conf from ironic_discoverd import firewall from ironic_discoverd import node_cache diff --git a/tox.ini b/tox.ini index 45648911a..63942af34 100644 --- a/tox.ini +++ b/tox.ini @@ -26,7 +26,7 @@ commands = max-complexity=15 [hacking] -import_exceptions = ironicclient.exceptions +import_exceptions = ironicclient.exceptions,ironic_discoverd.common.i18n [testenv:func] basepython = python2.7