diff options
author | Julia Kreger <juliaashleykreger@gmail.com> | 2018-05-08 12:29:42 -0700 |
---|---|---|
committer | Julia Kreger <juliaashleykreger@gmail.com> | 2018-05-09 06:12:57 -0700 |
commit | adaf9182ba70f68d2f8e36adfa08d8f6a5088ba1 (patch) | |
tree | 1134b5b3a256d457b265c5ebc884178c8f977627 | |
parent | 530a3ed088dd2a21bbf4ca4c9e4c2a62fa2248db (diff) | |
download | ironic-adaf9182ba70f68d2f8e36adfa08d8f6a5088ba1.tar.gz |
Fix E305 Errors
Story: #2001985
Change-Id: Idb9946e24e22bc64475dabb475d9cef09ee4d26b
-rwxr-xr-x | devstack/tools/ironic/scripts/configure-vm.py | 1 | ||||
-rw-r--r-- | ironic/api/controllers/v1/types.py | 1 | ||||
-rw-r--r-- | ironic/cmd/api.py | 1 | ||||
-rw-r--r-- | ironic/common/glance_service/service_utils.py | 1 | ||||
-rw-r--r-- | ironic/common/states.py | 1 | ||||
-rw-r--r-- | tox.ini | 4 |
6 files changed, 7 insertions, 2 deletions
diff --git a/devstack/tools/ironic/scripts/configure-vm.py b/devstack/tools/ironic/scripts/configure-vm.py index 144ec97d0..b381269ba 100755 --- a/devstack/tools/ironic/scripts/configure-vm.py +++ b/devstack/tools/ironic/scripts/configure-vm.py @@ -132,5 +132,6 @@ def main(): a = conn.defineXML(libvirt_template) print("Created machine %s with UUID %s" % (args.name, a.UUIDString())) + if __name__ == '__main__': main() diff --git a/ironic/api/controllers/v1/types.py b/ironic/api/controllers/v1/types.py index a0f1cad94..d64ba47bb 100644 --- a/ironic/api/controllers/v1/types.py +++ b/ironic/api/controllers/v1/types.py @@ -330,6 +330,7 @@ class LocalLinkConnectionType(wtypes.UserType): return None return LocalLinkConnectionType.validate(value) + locallinkconnectiontype = LocalLinkConnectionType() diff --git a/ironic/cmd/api.py b/ironic/cmd/api.py index 9cf373c94..74333e72e 100644 --- a/ironic/cmd/api.py +++ b/ironic/cmd/api.py @@ -44,5 +44,6 @@ def main(): launcher.launch_service(server, workers=server.workers) launcher.wait() + if __name__ == '__main__': sys.exit(main()) diff --git a/ironic/common/glance_service/service_utils.py b/ironic/common/glance_service/service_utils.py index 66ce9fcbb..94cfd2353 100644 --- a/ironic/common/glance_service/service_utils.py +++ b/ironic/common/glance_service/service_utils.py @@ -77,6 +77,7 @@ def _convert_timestamps_to_datetimes(image_meta): timeutils.parse_isotime(image_meta[attr])) return image_meta + _CONVERT_PROPS = ('block_device_mapping', 'mappings') diff --git a/ironic/common/states.py b/ironic/common/states.py index a0d26405f..bb24822f3 100644 --- a/ironic/common/states.py +++ b/ironic/common/states.py @@ -266,6 +266,7 @@ def on_enter(new_state, event): LOG.debug("Entering new state '%s' in response to event '%s'", new_state, event) + watchers = {} watchers['on_exit'] = on_exit watchers['on_enter'] = on_enter @@ -106,9 +106,9 @@ commands = {posargs} [flake8] # [W503] Line break before binary operator. -# NOTE(TheJulia): Adding E305,W605,W606,E501,F405 to the ignore list +# NOTE(TheJulia): Adding W605,W606,E501,F405 to the ignore list # until we are able to clean them up in the code base. -ignore = E129,W503,E305,W605,W606,E501,F405 +ignore = E129,W503,W605,W606,E501,F405 filename = *.py,app.wsgi exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build import-order-style = pep8 |