]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
python: Fix spelling
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Tue, 29 Aug 2023 02:23:51 +0000 (14:23 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 30 Aug 2023 02:15:29 +0000 (02:15 +0000)
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/kcc/kcc_utils.py
python/samba/remove_dc.py
python/samba/tests/__init__.py
python/samba/tests/complex_expressions.py
python/samba/tests/dns_aging.py

index ed4fa39bbeb84f61ac7377b726aa6885fdab3816..b3fb5b013f388cfc10890bec3a42835e841c9643 100644 (file)
@@ -104,7 +104,7 @@ class NamingContext(object):
         return self.nc_type == NCType.config
 
     def identify_by_basedn(self, samdb):
-        """Given an NC object, identify what type is is thru
+        """Given an NC object, identify what type it is thru
            the samdb basedn strings and NC sid value
         """
         # Invoke loader to initialize guid and more
@@ -2018,7 +2018,7 @@ class RepsFromTo(object):
         return text
 
     def __setattr__(self, item, value):
-        """Set an attribute and chyange update flag.
+        """Set an attribute and change update flag.
 
         Be aware that setting any RepsFromTo attribute will set the
         drsuapi.DRSUAPI_DRS_UPDATE_ADDRESS update flag.
index 6a2808043a8a92fbbf3fc1dee95544c99bb7674c..65321384384adba337197a2019153b5ff8182cd9 100644 (file)
@@ -128,10 +128,10 @@ def remove_dns_references(samdb, logger, dnsHostName, ignore_no_name=False):
 
     # Work out the set of names we will likely have an A record on by
     # default.  This is by default all the partitions of type
-    # domainDNS.  By finding the canocial name of all the partitions,
+    # domainDNS.  By finding the canonical name of all the partitions,
     # we find the likely candidates.  We only remove the record if it
     # matches the IP that was used by the dnsHostName.  This avoids us
-    # needing to look a the dns_update_list file from in the demote
+    # needing to look at a dns_update_list file from in the demote
     # script.
 
     def dns_name_from_dn(dn):
@@ -388,7 +388,7 @@ def remove_dc(samdb, logger, dc_name):
 
     server_dn = None
 
-    # Allow the name to be a the nTDS-DSA GUID
+    # Allow the name to be an nTDS-DSA GUID
     try:
         ntds_guid = uuid.UUID(hex=dc_name)
         ntds_dn = "<GUID=%s>" % ntds_guid
index 09c70aab134604a6e8a42a06517b3a935bc38ae6..086245121168f6d1f2535b185f9b5075ecebd34f 100644 (file)
@@ -174,7 +174,7 @@ class TestCase(unittest.TestCase):
         if kerberos_state is None:
             kerberos_state = template.get_kerberos_state()
 
-        # get a copy of the global creds or the passed in creds
+        # get a copy of the global creds or the passed in creds
         c = Credentials()
         c.set_username(username)
         c.set_password(userpass)
@@ -560,7 +560,7 @@ def connect_samdb_env(env_url, env_username, env_password, lp=None):
     creds = credentials.Credentials()
     if lp is None:
         # guess Credentials parameters here. Otherwise workstation
-        # and domain fields are NULL and gencache code segfalts
+        # and domain fields are NULL and gencache code segfaults
         lp = param.LoadParm()
         creds.guess(lp)
     creds.set_username(env_get_var_value(env_username))
@@ -709,7 +709,7 @@ def check_help_consistency(out,
 def get_env_dir(key):
     """A helper to pull a directory name from the environment, used in
     some tests that optionally write e.g. fuzz seeds into a directory
-    named in an environment valiable.
+    named in an environment variable.
     """
     dir = os.environ.get(key)
     if dir is None:
index 25be67c74d4e6e25438930eccdabb89d582606e3..d2927194902ac7f8995f5d286c848e89dd6570bd 100644 (file)
@@ -142,7 +142,7 @@ class ComplexExpressionTests(TestCase):
 
     # Take an ldap expression and an equivalent python expression.
     # Run and time the ldap expression and compare the result to the python
-    # expression run over the a list of ldap_object dicts.
+    # expression run over a list of ldap_object dicts.
     def assertLDAPQuery(self, ldap_expr, ou_dn, py_expr, ldap_objects):
 
         # run (and time) the LDAP search expression over the DB
index 31e4be9cb43d8a992cea068a18f210e80f80d109..99301c09d2291820f9d2d2beda280a5ecacd8aa4 100644 (file)
@@ -604,7 +604,7 @@ class TestDNSAging(DNSTest):
         r.wType = dnsp.DNS_TYPE_TOMBSTONE
         # r.dwTimeStamp is a 32 bit value in hours, and r.data is an
         # NTTIME (100 nanosecond intervals), both in the 1601 epoch. A
-        # tombstome will have both, but expiration calculations use
+        # tombstone will have both, but expiration calculations use
         # the r.data NTTIME EntombedTime timestamp (see [MS-DNSP]).
         r.dwTimeStamp = epoch_hours
         if epoch_nttime is None:
@@ -1507,7 +1507,7 @@ class TestDNSAging(DNSTest):
         timestamp3 = self.get_unique_txt_record(name, txt3).dwTimeStamp
         timestamp1 = self.get_unique_txt_record(name, txt1).dwTimeStamp
 
-        # Here, although there is no record frm which to get the zero
+        # Here, although there is no record from which to get the zero
         # timestamp, record 4 does it anyway.
         self.assert_timestamps_equal(timestamp1, longer_ago)
         self.assert_timestamps_equal(timestamp2, n_days_ago)