summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2023-06-06 13:17:58 +0200
committerAndreas Schneider <asn@cryptomilk.org>2023-06-23 13:44:31 +0000
commite046986d04cb9323a5853f565ca1e5e422f1d976 (patch)
tree1c63f1a5cef73c46da4b88e569e499e3c2b91de8 /python
parentde2c4879cefd83a9ca7d91b236669fa54806a22e (diff)
downloadsamba-e046986d04cb9323a5853f565ca1e5e422f1d976.tar.gz
samba-e046986d04cb9323a5853f565ca1e5e422f1d976.tar.bz2
samba-e046986d04cb9323a5853f565ca1e5e422f1d976.zip
python:samba:netcmd: Fix code spelling
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'python')
-rw-r--r--python/samba/netcmd/__init__.py6
-rw-r--r--python/samba/netcmd/common.py2
-rw-r--r--python/samba/netcmd/dns.py2
-rw-r--r--python/samba/netcmd/domain/backup.py2
-rw-r--r--python/samba/netcmd/domain/classicupgrade.py2
-rw-r--r--python/samba/netcmd/domain/provision.py4
-rw-r--r--python/samba/netcmd/domain/trust.py4
-rw-r--r--python/samba/netcmd/drs.py4
-rw-r--r--python/samba/netcmd/gpo.py3
-rw-r--r--python/samba/netcmd/ldapcmp.py6
-rw-r--r--python/samba/netcmd/ou.py14
-rw-r--r--python/samba/netcmd/schema.py2
-rw-r--r--python/samba/netcmd/user.py8
-rw-r--r--python/samba/netcmd/visualize.py2
14 files changed, 31 insertions, 30 deletions
diff --git a/python/samba/netcmd/__init__.py b/python/samba/netcmd/__init__.py
index e69da388f36..2e722243715 100644
--- a/python/samba/netcmd/__init__.py
+++ b/python/samba/netcmd/__init__.py
@@ -205,9 +205,9 @@ class Command(object):
self.apply_colour_choice(kwargs.pop('color', 'auto'))
# Check for a min a max number of allowed arguments, whenever possible
- # The suffix "?" means zero or one occurence
- # The suffix "+" means at least one occurence
- # The suffix "*" means zero or more occurences
+ # The suffix "?" means zero or one occurrence
+ # The suffix "+" means at least one occurrence
+ # The suffix "*" means zero or more occurrences
min_args = 0
max_args = 0
undetermined_max_args = False
diff --git a/python/samba/netcmd/common.py b/python/samba/netcmd/common.py
index 4cdccd073ba..f9f212e53fb 100644
--- a/python/samba/netcmd/common.py
+++ b/python/samba/netcmd/common.py
@@ -97,7 +97,7 @@ def netcmd_get_domain_infos_via_cldap(lp, creds, address=None):
def is_printable_attr_val(val):
import unicodedata
- # The value must be convertable to a string value.
+ # The value must be convertible to a string value.
try:
str_val = str(val)
except:
diff --git a/python/samba/netcmd/dns.py b/python/samba/netcmd/dns.py
index d40f01fa1cd..693fc9aa65f 100644
--- a/python/samba/netcmd/dns.py
+++ b/python/samba/netcmd/dns.py
@@ -68,7 +68,7 @@ class DnsConnWrapper:
dns_conn = DnsConnWrapper(server, lp, creds)
- then various common errors (for example, mispelled zones) on
+ then various common errors (for example, misspelled zones) on
common operations will raise CommandErrors that turn into
relatively nice messages (when compared to tracebacks).
diff --git a/python/samba/netcmd/domain/backup.py b/python/samba/netcmd/domain/backup.py
index fe667c85632..40779e58bb6 100644
--- a/python/samba/netcmd/domain/backup.py
+++ b/python/samba/netcmd/domain/backup.py
@@ -783,7 +783,7 @@ class cmd_domain_backup_rename(samba.netcmd.Command):
# Updates the CN=<domain>,CN=Partitions,CN=Configuration,... object to
# reflect the domain rename
def rename_domain_partition(self, logger, samdb, new_netbios_name):
- '''Renames the domain parition object and updates its nETBIOSName'''
+ '''Renames the domain partition object and updates its nETBIOSName'''
# lookup the crossRef object that holds the nETBIOSName (nCName has
# already been updated by this point, but the netBIOS hasn't)
diff --git a/python/samba/netcmd/domain/classicupgrade.py b/python/samba/netcmd/domain/classicupgrade.py
index 4a8b90b5f29..5b6a8a8decb 100644
--- a/python/samba/netcmd/domain/classicupgrade.py
+++ b/python/samba/netcmd/domain/classicupgrade.py
@@ -89,7 +89,7 @@ class cmd_domain_classicupgrade(Command):
metavar="[yes|no|auto]",
help="Define if we should use the native fs capabilities or a tdb file for "
"storing attributes likes ntacl when --use-ntvfs is set. "
- "auto tries to make an inteligent guess based on the user rights and system capabilities",
+ "auto tries to make an intelligent guess based on the user rights and system capabilities",
default="auto")
]
if samba.is_ntvfs_fileserver_built():
diff --git a/python/samba/netcmd/domain/provision.py b/python/samba/netcmd/domain/provision.py
index aa87accd13e..8f13e541f02 100644
--- a/python/samba/netcmd/domain/provision.py
+++ b/python/samba/netcmd/domain/provision.py
@@ -128,7 +128,7 @@ class cmd_domain_provision(Command):
metavar="[yes|no|auto]",
help="Define if we should use the native fs capabilities or a tdb file for "
"storing attributes likes ntacl when --use-ntvfs is set. "
- "auto tries to make an inteligent guess based on the user rights and system capabilities",
+ "auto tries to make an intelligent guess based on the user rights and system capabilities",
default="auto")
]
@@ -266,7 +266,7 @@ class cmd_domain_provision(Command):
if adprep_level is None:
# Select the adprep_level default based
- # on what the base schema premits
+ # on what the base schema permits
if base_schema in ["2008_R2", "2008_R2_old"]:
# without explicit --adprep-level=2008_R2
# we will skip the adprep step on
diff --git a/python/samba/netcmd/domain/trust.py b/python/samba/netcmd/domain/trust.py
index 361cb2900fd..e930f0006bb 100644
--- a/python/samba/netcmd/domain/trust.py
+++ b/python/samba/netcmd/domain/trust.py
@@ -1314,7 +1314,7 @@ class cmd_domain_trust_delete(DomainTrustCommand):
if remote_lsa_info.sid != local_tdo_info.sid or \
remote_lsa_info.name.string != local_tdo_info.netbios_name.string or \
remote_lsa_info.dns_domain.string != local_tdo_info.domain_name.string:
- raise CommandError("LocalTDO inconsistend: Netbios[%s] DNS[%s] SID[%s]" % (
+ raise CommandError("LocalTDO inconsistent: Netbios[%s] DNS[%s] SID[%s]" % (
local_tdo_info.netbios_name.string,
local_tdo_info.domain_name.string,
local_tdo_info.sid))
@@ -1334,7 +1334,7 @@ class cmd_domain_trust_delete(DomainTrustCommand):
if local_lsa_info.sid != remote_tdo_info.sid or \
local_lsa_info.name.string != remote_tdo_info.netbios_name.string or \
local_lsa_info.dns_domain.string != remote_tdo_info.domain_name.string:
- raise CommandError("RemoteTDO inconsistend: Netbios[%s] DNS[%s] SID[%s]" % (
+ raise CommandError("RemoteTDO inconsistent: Netbios[%s] DNS[%s] SID[%s]" % (
remote_tdo_info.netbios_name.string,
remote_tdo_info.domain_name.string,
remote_tdo_info.sid))
diff --git a/python/samba/netcmd/drs.py b/python/samba/netcmd/drs.py
index 6a4063a91d6..26cedec14a5 100644
--- a/python/samba/netcmd/drs.py
+++ b/python/samba/netcmd/drs.py
@@ -106,11 +106,11 @@ class cmd_drs_showrepl(Command):
"from this server"),
dest='format', action='store_const', const='summary'),
Option("--pull-summary", help=("Have we successfully replicated "
- "from all relevent servers?"),
+ "from all relevant servers?"),
dest='format', action='store_const', const='pull_summary'),
Option("--notify-summary", action='store_const',
const='notify_summary', dest='format',
- help=("Have we successfully notified all relevent servers of "
+ help=("Have we successfully notified all relevant servers of "
"local changes, and did they say they successfully "
"replicated?")),
Option("--classic", help="print local replication details",
diff --git a/python/samba/netcmd/gpo.py b/python/samba/netcmd/gpo.py
index 16c6e94689f..67c13b07fe5 100644
--- a/python/samba/netcmd/gpo.py
+++ b/python/samba/netcmd/gpo.py
@@ -2815,7 +2815,8 @@ samba-tool gpo manage symlink add {31B2F340-016D-11D2-945F-00C04FB984F9} /tmp/so
class cmd_remove_symlink(GPOCommand):
"""Removes a VGP Symbolic Link Group Policy from the sysvol
-This command removes a symlink setting from the sysvol from appling to winbind clients.
+This command removes a symlink setting from the sysvol from applying to winbind
+clients.
Example:
samba-tool gpo manage symlink remove {31B2F340-016D-11D2-945F-00C04FB984F9} /tmp/source /tmp/target
diff --git a/python/samba/netcmd/ldapcmp.py b/python/samba/netcmd/ldapcmp.py
index ff26e96332d..6936e9ce1f9 100644
--- a/python/samba/netcmd/ldapcmp.py
+++ b/python/samba/netcmd/ldapcmp.py
@@ -278,7 +278,7 @@ class Descriptor(object):
self.dacl_list.sort()
def extract_dacl(self):
- """ Extracts the DACL as a list of ACE string (with the brakets).
+ """ Extracts the DACL as a list of ACE string (with the brackets).
"""
try:
if "S:" in self.sddl:
@@ -876,7 +876,7 @@ class cmd_ldapcmp(Command):
Option("-v", "--verbose", dest="verbose", action="store_true", default=False,
help="Print all DN pairs that have been compared"),
Option("--sd", dest="descriptor", action="store_true", default=False,
- help="Compare nTSecurityDescriptor attibutes only"),
+ help="Compare nTSecurityDescriptor attributes only"),
Option("--sort-aces", dest="sort_aces", action="store_true", default=False,
help="Sort ACEs before comparison of nTSecurityDescriptor attribute"),
Option("--view", dest="view", default="section", choices=["section", "collision"],
@@ -888,7 +888,7 @@ class cmd_ldapcmp(Command):
Option("--scope", dest="scope", default="SUB", choices=["SUB", "ONE", "BASE"],
help="Pass search scope that builds DN list. Options: SUB, ONE, BASE"),
Option("--filter", dest="filter", default="",
- help="List of comma separated attributes to ignore in the comparision"),
+ help="List of comma separated attributes to ignore in the comparison"),
Option("--skip-missing-dn", dest="skip_missing_dn", action="store_true", default=False,
help="Skip report and failure due to missing DNs in one server or another"),
]
diff --git a/python/samba/netcmd/ou.py b/python/samba/netcmd/ou.py
index ce068716a01..71f61e42ab6 100644
--- a/python/samba/netcmd/ou.py
+++ b/python/samba/netcmd/ou.py
@@ -254,21 +254,21 @@ class cmd_listobjects(Command):
except Exception as e:
raise CommandError('Invalid ou_dn "%s": %s' % (ou_dn, e))
- minchilds = 0
+ minchildren = 0
scope = ldb.SCOPE_ONELEVEL
if recursive:
- minchilds = 1
+ minchildren = 1
scope = ldb.SCOPE_SUBTREE
try:
- childs = samdb.search(base=full_ou_dn,
- expression="(objectclass=*)",
- scope=scope, attrs=[])
- if len(childs) <= minchilds:
+ children = samdb.search(base=full_ou_dn,
+ expression="(objectclass=*)",
+ scope=scope, attrs=[])
+ if len(children) <= minchildren:
self.outf.write('ou "%s" is empty\n' % ou_dn)
return
- for child in sorted(childs, key=attrgetter('dn')):
+ for child in sorted(children, key=attrgetter('dn')):
if child.dn == full_ou_dn:
continue
if not full_dn:
diff --git a/python/samba/netcmd/schema.py b/python/samba/netcmd/schema.py
index d322da015ae..e665e834a04 100644
--- a/python/samba/netcmd/schema.py
+++ b/python/samba/netcmd/schema.py
@@ -57,7 +57,7 @@ class cmd_schema_attribute_modify(Command):
substring queries.
fSUBTREEATTINDEX: create a browsing index for this attribute. VLV searches
require this.
- fCONFIDENTIAL: indicate that the attribute is confidental and requires
+ fCONFIDENTIAL: indicate that the attribute is confidential and requires
special access checks.
fNEVERVALUEAUDIT: indicate that changes to this value should NOT be audited.
fRODCFILTEREDATTRIBUTE: indicate that this value should not be replicated to
diff --git a/python/samba/netcmd/user.py b/python/samba/netcmd/user.py
index 50d800ed04a..c292def0985 100644
--- a/python/samba/netcmd/user.py
+++ b/python/samba/netcmd/user.py
@@ -2508,7 +2508,7 @@ samba-tool user syncpasswords --terminate \\
def update_pid(pid):
if self.lockfd != -1:
got_exclusive = False
- # Try 5 times to get the exclusiv lock.
+ # Try 5 times to get the exclusive lock.
for i in range(0, 5):
try:
fcntl.lockf(self.lockfd, fcntl.LOCK_EX | fcntl.LOCK_NB)
@@ -2665,7 +2665,7 @@ samba-tool user syncpasswords --terminate \\
for msg in notify_handle:
if not isinstance(msg, ldb.Message):
- self.outf.write("referal: %s\n" % msg)
+ self.outf.write("referral: %s\n" % msg)
continue
created = msg.get("uSNCreated")[0]
changed = msg.get("uSNChanged")[0]
@@ -2726,11 +2726,11 @@ samba-tool user syncpasswords --terminate \\
log_msg("No process running.\n")
return
if not conflict:
- log_msg("Proccess %d is not running anymore.\n" % (
+ log_msg("Process %d is not running anymore.\n" % (
self.current_pid))
update_pid(None)
return
- log_msg("Sending SIGTERM to proccess %d.\n" % (
+ log_msg("Sending SIGTERM to process %d.\n" % (
self.current_pid))
os.kill(self.current_pid, signal.SIGTERM)
return
diff --git a/python/samba/netcmd/visualize.py b/python/samba/netcmd/visualize.py
index 7d84934c654..689d577ff87 100644
--- a/python/samba/netcmd/visualize.py
+++ b/python/samba/netcmd/visualize.py
@@ -151,7 +151,7 @@ class GraphCommand(Command):
def calc_distance_color_scheme(self, color_scheme, output):
"""Heuristics to work out the colour scheme for distance matrices.
- Returning None means no colour, otherwise it sould be a colour
+ Returning None means no colour, otherwise it should be a colour
from graph.COLOUR_SETS"""
if color_scheme is not None:
# --color-scheme implies --color=yes for *this* purpose.