Merge "Minor cleanup based on HACKING"
This commit is contained in:
@@ -13,11 +13,11 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
import nova.exception
|
||||||
from nova import flags
|
from nova import flags
|
||||||
from nova import log as logging
|
from nova import log as logging
|
||||||
from nova.openstack.common import cfg
|
from nova.openstack.common import cfg
|
||||||
from nova import utils
|
from nova import utils
|
||||||
from nova.exception import ClassNotFound
|
|
||||||
|
|
||||||
|
|
||||||
list_notifier_drivers_opt = cfg.MultiStrOpt('list_notifier_drivers',
|
list_notifier_drivers_opt = cfg.MultiStrOpt('list_notifier_drivers',
|
||||||
@@ -50,7 +50,7 @@ def _get_drivers():
|
|||||||
for notification_driver in FLAGS.list_notifier_drivers:
|
for notification_driver in FLAGS.list_notifier_drivers:
|
||||||
try:
|
try:
|
||||||
drivers.append(utils.import_object(notification_driver))
|
drivers.append(utils.import_object(notification_driver))
|
||||||
except ClassNotFound as e:
|
except nova.exception.ClassNotFound as e:
|
||||||
drivers.append(ImportFailureNotifier(e))
|
drivers.append(ImportFailureNotifier(e))
|
||||||
return drivers
|
return drivers
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,8 @@ from nova.scheduler import least_cost
|
|||||||
from nova.scheduler import host_manager
|
from nova.scheduler import host_manager
|
||||||
from nova.scheduler import distributed_scheduler
|
from nova.scheduler import distributed_scheduler
|
||||||
from nova import test
|
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):
|
def fake_filter_hosts(hosts, filter_properties):
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ from eventlet import greenthread
|
|||||||
from nova import exception
|
from nova import exception
|
||||||
from nova import test
|
from nova import test
|
||||||
from nova import utils
|
from nova import utils
|
||||||
from nova.utils import parse_mailmap, str_dict_replace
|
|
||||||
|
|
||||||
|
|
||||||
class ExceptionTestCase(test.TestCase):
|
class ExceptionTestCase(test.TestCase):
|
||||||
@@ -46,7 +45,7 @@ class ProjectTestCase(test.TestCase):
|
|||||||
topdir = os.path.normpath(os.path.dirname(__file__) + '/../../')
|
topdir = os.path.normpath(os.path.dirname(__file__) + '/../../')
|
||||||
missing = set()
|
missing = set()
|
||||||
contributors = 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_file = open(os.path.join(topdir,
|
||||||
'Authors'), 'r').read().lower()
|
'Authors'), 'r').read().lower()
|
||||||
|
|
||||||
@@ -57,7 +56,7 @@ class ProjectTestCase(test.TestCase):
|
|||||||
if "jenkins" in email and "openstack.org" in email:
|
if "jenkins" in email and "openstack.org" in email:
|
||||||
continue
|
continue
|
||||||
email = '<' + email.lower() + '>'
|
email = '<' + email.lower() + '>'
|
||||||
contributors.add(str_dict_replace(email, mailmap))
|
contributors.add(utils.str_dict_replace(email, mailmap))
|
||||||
else:
|
else:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user