Browse Source

[2353] style fixes: folded long lines

JINMEI Tatuya 12 years ago
parent
commit
08a5a3d312
2 changed files with 14 additions and 7 deletions
  1. 2 1
      src/bin/bind10/bind10_src.py.in
  2. 12 6
      src/bin/bind10/tests/bind10_test.py.in

+ 2 - 1
src/bin/bind10/bind10_src.py.in

@@ -480,7 +480,8 @@ class BoB:
             msg, env = self.cc_session.group_recvmsg()
         
         # wait_time is set to 0 only by unittests
-        if self.wait_time > 0 and not self.process_running(msg, "ConfigManager"):
+        if self.wait_time > 0 and not self.process_running(msg,
+                                                           "ConfigManager"):
             raise ProcessStartError("Configuration manager process has not started")
 
         return bind_cfgd

+ 12 - 6
src/bin/bind10/tests/bind10_test.py.in

@@ -1465,7 +1465,8 @@ class TestBossComponents(unittest.TestCase):
 
         for i in range(0, 20):
             pid = pids[i]
-            component = MockComponent('test' + str(pid), pid, 'Test' + str(pid))
+            component = MockComponent('test' + str(pid), pid,
+                                      'Test' + str(pid))
             bob.components[pid] = component
 
         process_list = bob.get_processes()
@@ -1476,7 +1477,8 @@ class TestBossComponents(unittest.TestCase):
             pid = process[0]
             self.assertLessEqual(last_pid, pid)
             last_pid = pid
-            self.assertEqual([pid, 'test' + str(pid), 'Test' + str(pid)], process)
+            self.assertEqual([pid, 'test' + str(pid), 'Test' + str(pid)],
+                             process)
 
     def _test_reap_children_helper(self, runnable, is_running, failed):
         '''Construct a BoB instance, set various data in it according to
@@ -1527,8 +1529,10 @@ class TestBossComponents(unittest.TestCase):
         bob.reap_children()
         self.assertFalse(bob.components_to_restart)
 
-        # case where bob._get_process_exit_status() raises OSError with errno.ECHILD
-        bob._get_process_exit_status = bob._get_process_exit_status_raises_oserror_echild
+        # case where bob._get_process_exit_status() raises OSError with
+        # errno.ECHILD
+        bob._get_process_exit_status = \
+            bob._get_process_exit_status_raises_oserror_echild
         bob.components_to_restart = []
         # this should catch and handle the OSError
         bob.reap_children()
@@ -1536,13 +1540,15 @@ class TestBossComponents(unittest.TestCase):
 
         # case where bob._get_process_exit_status() raises OSError with
         # errno other than ECHILD
-        bob._get_process_exit_status = bob._get_process_exit_status_raises_oserror_other
+        bob._get_process_exit_status = \
+            bob._get_process_exit_status_raises_oserror_other
         with self.assertRaises(OSError):
             bob.reap_children()
 
         # case where bob._get_process_exit_status() raises something
         # other than OSError
-        bob._get_process_exit_status = bob._get_process_exit_status_raises_other
+        bob._get_process_exit_status = \
+            bob._get_process_exit_status_raises_other
         with self.assertRaises(Exception):
             bob.reap_children()