diff options
| author | Mark McLoughlin <markmc@redhat.com> | 2012-08-10 11:54:34 +0100 |
|---|---|---|
| committer | Mark McLoughlin <markmc@redhat.com> | 2012-08-10 11:55:51 +0100 |
| commit | 9e1c6d0c799613ab692bd0bd8e19c3c2a51130d2 (patch) | |
| tree | c2135db2f12a158d4d20ae13405741016796a829 | |
| parent | 043e3f5981d89d35aa8bb8f1c42561c38451dfc4 (diff) | |
Sync some cleanups from openstack.common
Changes to openstack.common.notifier:
- fix bug lp:1019348,update openstack-common to support pep8 1.3.
Changes to openstack.common.setup:
- Fix errors reported by pyflakes
Changes to openstack.common.timeutils:
- Remove unused imports
Change-Id: Iac46d11a996857c84e06a8dbd3ecfcd774142ef8
| -rw-r--r-- | nova/openstack/common/notifier/log_notifier.py | 3 | ||||
| -rw-r--r-- | nova/openstack/common/notifier/rabbit_notifier.py | 6 | ||||
| -rw-r--r-- | nova/openstack/common/setup.py | 5 | ||||
| -rw-r--r-- | nova/openstack/common/timeutils.py | 1 |
4 files changed, 7 insertions, 8 deletions
diff --git a/nova/openstack/common/notifier/log_notifier.py b/nova/openstack/common/notifier/log_notifier.py index ede96a019..a334f92e7 100644 --- a/nova/openstack/common/notifier/log_notifier.py +++ b/nova/openstack/common/notifier/log_notifier.py @@ -30,5 +30,6 @@ def notify(_context, message): CONF.default_notification_level) priority = priority.lower() logger = logging.getLogger( - 'nova.openstack.common.notification.%s' % message['event_type']) + 'nova.openstack.common.notification.%s' % + message['event_type']) getattr(logger, priority)(jsonutils.dumps(message)) diff --git a/nova/openstack/common/notifier/rabbit_notifier.py b/nova/openstack/common/notifier/rabbit_notifier.py index d37b5ea65..c7b3f54fe 100644 --- a/nova/openstack/common/notifier/rabbit_notifier.py +++ b/nova/openstack/common/notifier/rabbit_notifier.py @@ -22,9 +22,9 @@ from nova.openstack.common import rpc LOG = logging.getLogger(__name__) -notification_topic_opt = cfg.ListOpt('notification_topics', - default=['notifications', ], - help='AMQP topic used for openstack notifications') +notification_topic_opt = cfg.ListOpt( + 'notification_topics', default=['notifications', ], + help='AMQP topic used for openstack notifications') CONF = cfg.CONF CONF.register_opt(notification_topic_opt) diff --git a/nova/openstack/common/setup.py b/nova/openstack/common/setup.py index 59f255d0c..628f5e3c9 100644 --- a/nova/openstack/common/setup.py +++ b/nova/openstack/common/setup.py @@ -52,7 +52,6 @@ def canonicalize_emails(changelog, mapping): # Get requirements from the first file that exists def get_reqs_from_files(requirements_files): - reqs_in = [] for requirements_file in requirements_files: if os.path.exists(requirements_file): return open(requirements_file, 'r').read().split('\n') @@ -144,8 +143,8 @@ def _get_git_next_version_suffix(branch_name): # where the bit after the last . is the short sha, and the bit between # the last and second to last is the revno count (revno, sha) = post_version.split(".")[-2:] - first_half = "%(milestonever)s~%(datestamp)s" % locals() - second_half = "%(revno_prefix)s%(revno)s.%(sha)s" % locals() + first_half = "%s~%s" % (milestonever, datestamp) + second_half = "%s%s.%s" % (revno_prefix, revno, sha) return ".".join((first_half, second_half)) diff --git a/nova/openstack/common/timeutils.py b/nova/openstack/common/timeutils.py index 5eeaf70aa..4416a3b19 100644 --- a/nova/openstack/common/timeutils.py +++ b/nova/openstack/common/timeutils.py @@ -21,7 +21,6 @@ Time related utilities and helper functions. import calendar import datetime -import time import iso8601 |
