summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--openstack/common/iniparser.py2
-rw-r--r--openstack/common/log.py4
-rw-r--r--openstack/common/policy.py20
-rw-r--r--openstack/common/rootwrap/filters.py6
-rw-r--r--tests/unit/test_policy.py2
-rw-r--r--tox.ini2
6 files changed, 18 insertions, 18 deletions
diff --git a/openstack/common/iniparser.py b/openstack/common/iniparser.py
index 2412844..9bf399f 100644
--- a/openstack/common/iniparser.py
+++ b/openstack/common/iniparser.py
@@ -54,7 +54,7 @@ class BaseParser(object):
value = value.strip()
if ((value and value[0] == value[-1]) and
- (value[0] == "\"" or value[0] == "'")):
+ (value[0] == "\"" or value[0] == "'")):
value = value[1:-1]
return key.strip(), [value]
diff --git a/openstack/common/log.py b/openstack/common/log.py
index d88a2c9..14d5138 100644
--- a/openstack/common/log.py
+++ b/openstack/common/log.py
@@ -259,7 +259,7 @@ class JSONFormatter(logging.Formatter):
class PublishErrorsHandler(logging.Handler):
def emit(self, record):
if ('openstack.common.notifier.log_notifier' in
- CONF.notification_driver):
+ CONF.notification_driver):
return
notifier.api.notify(None, 'error.publisher',
'error_notification',
@@ -425,7 +425,7 @@ class LegacyFormatter(logging.Formatter):
self._fmt = CONF.logging_default_format_string
if (record.levelno == logging.DEBUG and
- CONF.logging_debug_format_suffix):
+ CONF.logging_debug_format_suffix):
self._fmt += " " + CONF.logging_debug_format_suffix
# Cache this on the record, Logger will respect our formated copy
diff --git a/openstack/common/policy.py b/openstack/common/policy.py
index 5f2bf29..8f5a23a 100644
--- a/openstack/common/policy.py
+++ b/openstack/common/policy.py
@@ -574,19 +574,19 @@ class ParseState(object):
for reduction, methname in self.reducers:
if (len(self.tokens) >= len(reduction) and
- self.tokens[-len(reduction):] == reduction):
- # Get the reduction method
- meth = getattr(self, methname)
+ self.tokens[-len(reduction):] == reduction):
+ # Get the reduction method
+ meth = getattr(self, methname)
- # Reduce the token stream
- results = meth(*self.values[-len(reduction):])
+ # Reduce the token stream
+ results = meth(*self.values[-len(reduction):])
- # Update the tokens and values
- self.tokens[-len(reduction):] = [r[0] for r in results]
- self.values[-len(reduction):] = [r[1] for r in results]
+ # Update the tokens and values
+ self.tokens[-len(reduction):] = [r[0] for r in results]
+ self.values[-len(reduction):] = [r[1] for r in results]
- # Check for any more reductions
- return self.reduce()
+ # Check for any more reductions
+ return self.reduce()
def shift(self, tok, value):
"""Adds one more token to the state. Calls reduce()."""
diff --git a/openstack/common/rootwrap/filters.py b/openstack/common/rootwrap/filters.py
index 632e8d5..905bbab 100644
--- a/openstack/common/rootwrap/filters.py
+++ b/openstack/common/rootwrap/filters.py
@@ -95,9 +95,9 @@ class DnsmasqFilter(CommandFilter):
def match(self, userargs):
if (userargs[0] == 'env' and
- userargs[1].startswith(self.CONFIG_FILE_ARG) and
- userargs[2].startswith('NETWORK_ID=') and
- userargs[3] == 'dnsmasq'):
+ userargs[1].startswith(self.CONFIG_FILE_ARG) and
+ userargs[2].startswith('NETWORK_ID=') and
+ userargs[3] == 'dnsmasq'):
return True
return False
diff --git a/tests/unit/test_policy.py b/tests/unit/test_policy.py
index a0cae6f..684a113 100644
--- a/tests/unit/test_policy.py
+++ b/tests/unit/test_policy.py
@@ -450,7 +450,7 @@ class ParseStateMetaTestCase(unittest.TestCase):
self.assertTrue(hasattr(FakeState, 'reducers'))
for reduction, reducer in FakeState.reducers:
if (reduction == ['a', 'b', 'c'] or
- reduction == ['d', 'e', 'f']):
+ reduction == ['d', 'e', 'f']):
self.assertEqual(reducer, 'reduce1')
elif reduction == ['g', 'h', 'i']:
self.assertEqual(reducer, 'reduce2')
diff --git a/tox.ini b/tox.ini
index d7ecb96..6efcecc 100644
--- a/tox.ini
+++ b/tox.ini
@@ -15,7 +15,7 @@ commands = nosetests {posargs}
[testenv:pep8]
deps = pep8==1.3.3
-commands = pep8 --repeat --show-source --ignore=E125 --exclude=.venv,.tox,dist,doc,*.egg,.update-venv .
+commands = pep8 --repeat --show-source --exclude=.venv,.tox,dist,doc,*.egg,.update-venv .
[testenv:cover]
setenv = NOSE_WITH_COVERAGE=1