From 6c6db88ddacdc962c146ef348a62605405a5c109 Mon Sep 17 00:00:00 2001 From: Joseph Sutton Date: Tue, 29 Aug 2023 14:23:51 +1200 Subject: [PATCH] python: Fix spelling Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- python/samba/kcc/kcc_utils.py | 4 ++-- python/samba/remove_dc.py | 6 +++--- python/samba/tests/__init__.py | 6 +++--- python/samba/tests/complex_expressions.py | 2 +- python/samba/tests/dns_aging.py | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/python/samba/kcc/kcc_utils.py b/python/samba/kcc/kcc_utils.py index ed4fa39bbeb..b3fb5b013f3 100644 --- a/python/samba/kcc/kcc_utils.py +++ b/python/samba/kcc/kcc_utils.py @@ -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. diff --git a/python/samba/remove_dc.py b/python/samba/remove_dc.py index 6a2808043a8..65321384384 100644 --- a/python/samba/remove_dc.py +++ b/python/samba/remove_dc.py @@ -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 = "" % ntds_guid diff --git a/python/samba/tests/__init__.py b/python/samba/tests/__init__.py index 09c70aab134..08624512116 100644 --- a/python/samba/tests/__init__.py +++ b/python/samba/tests/__init__.py @@ -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 a 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: diff --git a/python/samba/tests/complex_expressions.py b/python/samba/tests/complex_expressions.py index 25be67c74d4..d2927194902 100644 --- a/python/samba/tests/complex_expressions.py +++ b/python/samba/tests/complex_expressions.py @@ -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 diff --git a/python/samba/tests/dns_aging.py b/python/samba/tests/dns_aging.py index 31e4be9cb43..99301c09d22 100644 --- a/python/samba/tests/dns_aging.py +++ b/python/samba/tests/dns_aging.py @@ -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)