diff mbox

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

Message ID 508339EC0242094682895ED3EC4EBA312E57118E@CBSEX1.cloudbase.local
State Superseded
Headers show

Commit Message

Paul Boca Aug. 29, 2016, 7:12 a.m. UTC
Hi Guru,

I retested without this patch and indeed there is no flake error.
For some reason it gave me some errors when I made the changes.

I will get this changes out.

Thanks,
Paul

From: Guru Shetty [mailto:guru@ovn.org]

Sent: Friday, August 26, 2016 9:01 PM
To: Paul Boca
Cc: dev@openvswitch.org
Subject: Re: [ovs-dev] [PATCH 06/12] python tests: Fixed flake8 errors in daemon_unix

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<mailto:pboca@cloudbasesolutions.com>> wrote:
Fixed small alignement issues.

Signed-off-by: Paul-Daniel Boca <pboca@cloudbasesolutions.com<mailto:pboca@cloudbasesolutions.com>>

---
 python/ovs/daemon_unix.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

--
2.7.2.windows.1
_______________________________________________
dev mailing list
dev@openvswitch.org<mailto: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
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()