diff options
author | Russell Bryant <russell@ovn.org> | 2016-01-05 14:50:40 -0500 |
---|---|---|
committer | Russell Bryant <russell@ovn.org> | 2016-01-05 18:18:21 -0500 |
commit | eda26d40ae086539e7de3770818f80580fc231b3 (patch) | |
tree | 2e4531b7516b299403567c72108151980bba7bfd /python | |
parent | f7f7fcced57438de4ff422712edf6809183b40bc (diff) | |
download | openvswitch-eda26d40ae086539e7de3770818f80580fc231b3.tar.gz |
python: Resolve some indentation warnings.
This patch resolves the following warnings from flake8:
E111 indentation is not a multiple of four
E112 expected an indented block
E113 unexpected indentation
It's critical to have correct indentation in Python code, so it seemed
worth enabling these warnings.
Signed-off-by: Russell Bryant <russell@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'python')
-rw-r--r-- | python/ovs/daemon.py | 2 | ||||
-rw-r--r-- | python/ovs/db/idl.py | 31 | ||||
-rw-r--r-- | python/ovstest/rpcserver.py | 6 |
3 files changed, 24 insertions, 15 deletions
diff --git a/python/ovs/daemon.py b/python/ovs/daemon.py index 61355c4f7..e5e885840 100644 --- a/python/ovs/daemon.py +++ b/python/ovs/daemon.py @@ -325,7 +325,7 @@ def _monitor_daemon(daemon_pid): vlog.info("%s, exiting" % status_msg) sys.exit(0) - # Running in new daemon process. + # Running in new daemon process. def _close_standard_fds(): diff --git a/python/ovs/db/idl.py b/python/ovs/db/idl.py index c6e0d3836..514503296 100644 --- a/python/ovs/db/idl.py +++ b/python/ovs/db/idl.py @@ -749,17 +749,26 @@ class Transaction(object): of Idl.change_seqno. (Transaction.commit_block() calls Idl.run().)""" # Status values that Transaction.commit() can return. - UNCOMMITTED = "uncommitted" # Not yet committed or aborted. - UNCHANGED = "unchanged" # Transaction didn't include any changes. - INCOMPLETE = "incomplete" # Commit in progress, please wait. - ABORTED = "aborted" # ovsdb_idl_txn_abort() called. - SUCCESS = "success" # Commit successful. - TRY_AGAIN = "try again" # Commit failed because a "verify" operation - # reported an inconsistency, due to a network - # problem, or other transient failure. Wait - # for a change, then try again. - NOT_LOCKED = "not locked" # Server hasn't given us the lock yet. - ERROR = "error" # Commit failed due to a hard error. + + # Not yet committed or aborted. + UNCOMMITTED = "uncommitted" + # Transaction didn't include any changes. + UNCHANGED = "unchanged" + # Commit in progress, please wait. + INCOMPLETE = "incomplete" + # ovsdb_idl_txn_abort() called. + ABORTED = "aborted" + # Commit successful. + SUCCESS = "success" + # Commit failed because a "verify" operation + # reported an inconsistency, due to a network + # problem, or other transient failure. Wait + # for a change, then try again. + TRY_AGAIN = "try again" + # Server hasn't given us the lock yet. + NOT_LOCKED = "not locked" + # Commit failed due to a hard error. + ERROR = "error" @staticmethod def status_to_string(status): diff --git a/python/ovstest/rpcserver.py b/python/ovstest/rpcserver.py index 5c9201441..80b9c4efe 100644 --- a/python/ovstest/rpcserver.py +++ b/python/ovstest/rpcserver.py @@ -359,9 +359,9 @@ def start_rpc_server(port): try: print "Starting RPC server\n" sys.stdout.flush() - # If this server was started from ovs-test client then we must flush - # STDOUT so that client would know that server is ready to accept - # XML RPC connections. + # If this server was started from ovs-test client then we must flush + # STDOUT so that client would know that server is ready to accept + # XML RPC connections. reactor.run() finally: rpc_server.cleanup() |