Browse Source

[2297] Make some minor readability and typo fixes in comments

Mukund Sivaraman 12 years ago
parent
commit
f6af1e6965

+ 1 - 1
src/lib/python/isc/sysinfo/sysinfo.py

@@ -413,7 +413,7 @@ class SysInfoFreeBSD(SysInfoFreeBSDOSX):
             # There doesn't seem to be an easy way to reliably detect whether
             # There doesn't seem to be an easy way to reliably detect whether
             # the kernel was built with SMP support on FreeBSD.  We use
             # the kernel was built with SMP support on FreeBSD.  We use
             # a sysctl variable that is only defined in SMP kernels.
             # a sysctl variable that is only defined in SMP kernels.
-            # This assumption seems to hold for recent several versions of
+            # This assumption seems to hold for several recent versions of
             # FreeBSD, but it may not always be so for future versions.
             # FreeBSD, but it may not always be so for future versions.
             s = subprocess.check_output(['sysctl', '-n',
             s = subprocess.check_output(['sysctl', '-n',
                                          'kern.smp.forward_signal_enabled'])
                                          'kern.smp.forward_signal_enabled'])

+ 6 - 6
src/lib/python/isc/sysinfo/tests/sysinfo_test.py

@@ -277,7 +277,7 @@ class SysInfoTest(unittest.TestCase):
         """Test that SysInfoFromFactory returns a valid system-specific
         """Test that SysInfoFromFactory returns a valid system-specific
         SysInfo implementation.
         SysInfo implementation.
 
 
-        See sysinfo.SysInfoTestcase() for some ofthe parameters.
+        See sysinfo.SysInfoTestcase() for some of the parameters.
 
 
         """
         """
 
 
@@ -293,7 +293,7 @@ class SysInfoTest(unittest.TestCase):
         self.assertEqual('Unknown', s.get_platform_machine())
         self.assertEqual('Unknown', s.get_platform_machine())
         self.assertFalse(s.get_platform_is_smp())
         self.assertFalse(s.get_platform_is_smp())
         self.assertEqual(131072, s.get_uptime())
         self.assertEqual(131072, s.get_uptime())
-        # We check we do NOT add 's' to 'day' (because it's singular):
+        # We check that we do NOT add 's' to 'day' (because it's singular):
         self.assertEqual('1 day, 12:24', s.get_uptime_desc())
         self.assertEqual('1 day, 12:24', s.get_uptime_desc())
         self.assertEqual(None, s.get_loadavg())
         self.assertEqual(None, s.get_loadavg())
         self.assertEqual(None, s.get_mem_total())
         self.assertEqual(None, s.get_mem_total())
@@ -327,8 +327,8 @@ class SysInfoTest(unittest.TestCase):
         self.assertEqual('myhostname', s.get_platform_hostname())
         self.assertEqual('myhostname', s.get_platform_hostname())
         self.assertTrue(s.get_platform_is_smp())
         self.assertTrue(s.get_platform_is_smp())
         self.assertEqual(172801, s.get_uptime())
         self.assertEqual(172801, s.get_uptime())
-        # We check we add 's' to 'day', and the mm part has an additional
-        # 0, i.e., not '0:0' but '0:00':
+        # We check that we add 's' to 'day', and that the mm part has an
+        # additional 0, i.e., not '0:0' but '0:00':
         self.assertEqual('2 days, 0:00', s.get_uptime_desc())
         self.assertEqual('2 days, 0:00', s.get_uptime_desc())
         self.assertEqual((0.1, 0.2, 0.3), s.get_loadavg())
         self.assertEqual((0.1, 0.2, 0.3), s.get_loadavg())
         self.assertEqual(3157884928, s.get_mem_total())
         self.assertEqual(3157884928, s.get_mem_total())
@@ -409,8 +409,8 @@ class SysInfoTest(unittest.TestCase):
         self.assertEqual(NPROCESSORS_FREEBSD, s.get_num_processors())
         self.assertEqual(NPROCESSORS_FREEBSD, s.get_num_processors())
         self.assertTrue(s.get_platform_is_smp())
         self.assertTrue(s.get_platform_is_smp())
 
 
-        # We check the kernel SMP support by the availability of an sysctl
-        # variable.  The value (especiall a 0 value) shouldn't matter.
+        # We check the kernel SMP support by the availability of a sysctl
+        # variable.  The value (especially a 0 value) shouldn't matter.
         faked_process_output['smp-sysctl'] = b'0\n'
         faked_process_output['smp-sysctl'] = b'0\n'
         s = SysInfoFromFactory()
         s = SysInfoFromFactory()
         self.assertTrue(s.get_platform_is_smp())
         self.assertTrue(s.get_platform_is_smp())