diff mbox

[ovs-dev,06/12] python tests: Fixed flake8 errors in daemon_unix

Message ID 1472222398-5780-7-git-send-email-pboca@cloudbasesolutions.com
State Superseded
Delegated to: Guru Shetty
Headers show

Commit Message

Paul Boca Aug. 26, 2016, 2:40 p.m. UTC
Fixed small alignement issues.

Signed-off-by: Paul-Daniel Boca <pboca@cloudbasesolutions.com>
---
 python/ovs/daemon_unix.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Comments

Gurucharan Shetty Aug. 26, 2016, 6 p.m. UTC | #1
What flake8 errors do you get? Since this is daemon_unix.py, why weren't we
getting these errors till now?

On 26 August 2016 at 07:40, Paul Boca <pboca@cloudbasesolutions.com> wrote:

> Fixed small alignement issues.
>
> Signed-off-by: Paul-Daniel Boca <pboca@cloudbasesolutions.com>
> ---
>  python/ovs/daemon_unix.py | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/python/ovs/daemon_unix.py b/python/ovs/daemon_unix.py
> index bd06195..0080677 100644
> --- a/python/ovs/daemon_unix.py
> +++ b/python/ovs/daemon_unix.py
> @@ -53,6 +53,7 @@ _monitor = False
>  # File descriptor used by daemonize_start() and daemonize_complete().
>  _daemonize_fd = None
>
> +
>  RESTART_EXIT_CODE = 5
>
I

>
> @@ -125,6 +126,7 @@ def _make_pidfile():
>      # Create a temporary pidfile.
>      tmpfile = "%s.tmp%d" % (_pidfile, pid)
>      ovs.fatal_signal.add_file_to_unlink(tmpfile)
> +
>      try:
>          # This is global to keep Python from garbage-collecting and
>          # therefore closing our file after this function exits.  That
> would
> @@ -180,7 +182,8 @@ def _make_pidfile():
>      if not _overwrite_pidfile:
>          error = ovs.fatal_signal.unlink_file_now(tmpfile)
>          if error:
> -            _fatal("%s: unlink failed (%s)" % (tmpfile,
> os.strerror(error)))
> +            _fatal("%s: unlink failed (%s)"
> +                   % (tmpfile, os.strerror(error)))
>
>      global _pidfile_dev
>      global _pidfile_ino
> @@ -250,7 +253,7 @@ def _fork_and_wait_for_startup():
>
>          os.close(rfd)
>      else:
> -        # Running in parent process.
> +        # Running in child process.
>          os.close(rfd)
>          ovs.timeval.postfork()
>
> --
> 2.7.2.windows.1
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
>
diff mbox

Patch

diff --git a/python/ovs/daemon_unix.py b/python/ovs/daemon_unix.py
index bd06195..0080677 100644
--- a/python/ovs/daemon_unix.py
+++ b/python/ovs/daemon_unix.py
@@ -53,6 +53,7 @@  _monitor = False
 # File descriptor used by daemonize_start() and daemonize_complete().
 _daemonize_fd = None
 
+
 RESTART_EXIT_CODE = 5
 
 
@@ -125,6 +126,7 @@  def _make_pidfile():
     # Create a temporary pidfile.
     tmpfile = "%s.tmp%d" % (_pidfile, pid)
     ovs.fatal_signal.add_file_to_unlink(tmpfile)
+
     try:
         # This is global to keep Python from garbage-collecting and
         # therefore closing our file after this function exits.  That would
@@ -180,7 +182,8 @@  def _make_pidfile():
     if not _overwrite_pidfile:
         error = ovs.fatal_signal.unlink_file_now(tmpfile)
         if error:
-            _fatal("%s: unlink failed (%s)" % (tmpfile, os.strerror(error)))
+            _fatal("%s: unlink failed (%s)"
+                   % (tmpfile, os.strerror(error)))
 
     global _pidfile_dev
     global _pidfile_ino
@@ -250,7 +253,7 @@  def _fork_and_wait_for_startup():
 
         os.close(rfd)
     else:
-        # Running in parent process.
+        # Running in child process.
         os.close(rfd)
         ovs.timeval.postfork()