diff --git a/nova/notifier/list_notifier.py b/nova/notifier/list_notifier.py index 886e30c7..2f5c9e4a 100644 --- a/nova/notifier/list_notifier.py +++ b/nova/notifier/list_notifier.py @@ -13,11 +13,11 @@ # License for the specific language governing permissions and limitations # under the License. +import nova.exception from nova import flags from nova import log as logging from nova.openstack.common import cfg from nova import utils -from nova.exception import ClassNotFound list_notifier_drivers_opt = cfg.MultiStrOpt('list_notifier_drivers', @@ -50,7 +50,7 @@ def _get_drivers(): for notification_driver in FLAGS.list_notifier_drivers: try: drivers.append(utils.import_object(notification_driver)) - except ClassNotFound as e: + except nova.exception.ClassNotFound as e: drivers.append(ImportFailureNotifier(e)) return drivers diff --git a/nova/tests/scheduler/test_distributed_scheduler.py b/nova/tests/scheduler/test_distributed_scheduler.py index a8e2d931..95028044 100644 --- a/nova/tests/scheduler/test_distributed_scheduler.py +++ b/nova/tests/scheduler/test_distributed_scheduler.py @@ -24,7 +24,8 @@ from nova.scheduler import least_cost from nova.scheduler import host_manager from nova.scheduler import distributed_scheduler from nova import test -from nova.tests.scheduler import fakes, test_scheduler +from nova.tests.scheduler import fakes +from nova.tests.scheduler import test_scheduler def fake_filter_hosts(hosts, filter_properties): diff --git a/nova/tests/test_misc.py b/nova/tests/test_misc.py index 0a673e68..ab352b54 100644 --- a/nova/tests/test_misc.py +++ b/nova/tests/test_misc.py @@ -26,7 +26,6 @@ from eventlet import greenthread from nova import exception from nova import test from nova import utils -from nova.utils import parse_mailmap, str_dict_replace class ExceptionTestCase(test.TestCase): @@ -46,7 +45,7 @@ class ProjectTestCase(test.TestCase): topdir = os.path.normpath(os.path.dirname(__file__) + '/../../') missing = set() contributors = set() - mailmap = parse_mailmap(os.path.join(topdir, '.mailmap')) + mailmap = utils.parse_mailmap(os.path.join(topdir, '.mailmap')) authors_file = open(os.path.join(topdir, 'Authors'), 'r').read().lower() @@ -57,7 +56,7 @@ class ProjectTestCase(test.TestCase): if "jenkins" in email and "openstack.org" in email: continue email = '<' + email.lower() + '>' - contributors.add(str_dict_replace(email, mailmap)) + contributors.add(utils.str_dict_replace(email, mailmap)) else: return