summaryrefslogtreecommitdiff
path: root/src/op_mode
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2026-06-17 14:21:35 +0300
committerGitHub <noreply@github.com>2026-06-17 14:21:35 +0300
commit7a1fa970b13c0006fa59ad9a46023b3e8037de6f (patch)
tree1e3b19c7162212f552b77297b03875d92daf33dd /src/op_mode
parentc207f4a1ce9b13cd7e0664d35d805e633ebc69fb (diff)
parent040a4c0565081d0b6df2bf789737ed0e7bde2642 (diff)
downloadvyos-1x-7a1fa970b13c0006fa59ad9a46023b3e8037de6f.tar.gz
vyos-1x-7a1fa970b13c0006fa59ad9a46023b3e8037de6f.zip
Merge pull request #5277 from c-po/can-not-cannot
T8923: normalize "can not" to "cannot" and other typo fixes
Diffstat (limited to 'src/op_mode')
-rwxr-xr-xsrc/op_mode/container.py2
-rwxr-xr-xsrc/op_mode/format_disk.py4
-rwxr-xr-xsrc/op_mode/image_installer.py6
-rwxr-xr-xsrc/op_mode/lldp.py4
-rw-r--r--src/op_mode/mtr.py6
-rwxr-xr-xsrc/op_mode/show-bond.py2
6 files changed, 12 insertions, 12 deletions
diff --git a/src/op_mode/container.py b/src/op_mode/container.py
index e0753f1be..81dc35098 100755
--- a/src/op_mode/container.py
+++ b/src/op_mode/container.py
@@ -107,7 +107,7 @@ def delete_image(name: str, force: typing.Optional[bool] = False):
if name == 'all':
# gather list of all images and pass them to the removal list
name = cmd('sudo podman image ls --quiet')
- # If there are no container images left, we can not delete them all
+ # If there are no container images left, we cannot delete them all
if not name: return
# replace newline with whitespace
name = name.replace('\n', ' ')
diff --git a/src/op_mode/format_disk.py b/src/op_mode/format_disk.py
index 56cb51a02..095892791 100755
--- a/src/op_mode/format_disk.py
+++ b/src/op_mode/format_disk.py
@@ -106,11 +106,11 @@ if __name__ == '__main__':
exit(1)
if target_disk not in eligible_target_disks:
- print(f'Device {target_disk} can not be formatted')
+ print(f'Device {target_disk} cannot be formatted')
exit(1)
if proto_disk not in eligible_proto_disks:
- print(f'Device {proto_disk} can not be used as a prototype for {target_disk}')
+ print(f'Device {proto_disk} cannot be used as a prototype for {target_disk}')
exit(1)
if is_busy(target_disk):
diff --git a/src/op_mode/image_installer.py b/src/op_mode/image_installer.py
index 9ac7718de..089f83670 100755
--- a/src/op_mode/image_installer.py
+++ b/src/op_mode/image_installer.py
@@ -98,7 +98,7 @@ MSG_INFO_INSTALL_RAID_FOUND_DISKS: str = 'Would you like to configure RAID-1 mir
MSG_INFO_INSTALL_RAID_CHOOSE_DISKS: str = 'Would you like to choose two disks for RAID-1 mirroring?'
MSG_INFO_INSTALL_DISK_CONFIRM: str = 'Installation will delete all data on the drive. Continue?'
MSG_INFO_INSTALL_RAID_CONFIRM: str = 'Installation will delete all data on both drives. Continue?'
-MSG_INFO_INSTALL_PARTITONING: str = 'Creating partition table...'
+MSG_INFO_INSTALL_PARTITIONING: str = 'Creating partition table...'
MSG_INPUT_CONFIG_FOUND: str = 'An active configuration was found. Would you like to copy it to the new image?'
MSG_INPUT_CONFIG_CHOICE: str = 'The following config files are available for boot:'
MSG_INPUT_CONFIG_CHOOSE: str = 'Which file would you like as boot config?'
@@ -244,7 +244,7 @@ def create_partitions(target_disk: str, target_size: int,
else:
rootfs_size: int = available_size
- print(MSG_INFO_INSTALL_PARTITONING)
+ print(MSG_INFO_INSTALL_PARTITIONING)
raid.clear()
disk.disk_cleanup(target_disk)
disk_details: disk.DiskDetails = disk.parttable_create(target_disk,
@@ -600,7 +600,7 @@ def configure_authentication(config_file: str, password: str) -> None:
config_file (str): path of target config file
password (str): plaintext password
- N.B. this can not be deferred by simply setting the plaintext password
+ N.B. this cannot be deferred by simply setting the plaintext password
and relying on the config mode script to process at boot, as the config
will not automatically be saved in that case, thus leaving the
plaintext exposed
diff --git a/src/op_mode/lldp.py b/src/op_mode/lldp.py
index 6d77db5bc..0994b5d49 100755
--- a/src/op_mode/lldp.py
+++ b/src/op_mode/lldp.py
@@ -64,7 +64,7 @@ def _get_formatted_output(raw_data):
tmp = dict_search('lldp.interface', raw_data)
if not tmp:
return None
- # One can not always ensure that "interface" is of type list, add safeguard.
+ # One cannot always ensure that "interface" is of type list, add safeguard.
# E.G. Juniper Networks, Inc. ex2300-c-12t only has a dict, not a list of dicts
if isinstance(tmp, dict):
tmp = [tmp]
@@ -87,7 +87,7 @@ def _get_formatted_output(raw_data):
# Capabilities
cap = ''
capabilities = jmespath.search('chassis.[*][0][0].capability', values)
- # One can not always ensure that "capability" is of type list, add
+ # One cannot always ensure that "capability" is of type list, add
# safeguard. E.G. Unify US-24-250W only has a dict, not a list of dicts
if isinstance(capabilities, dict):
capabilities = [capabilities]
diff --git a/src/op_mode/mtr.py b/src/op_mode/mtr.py
index 646d95e7b..139bd4edd 100644
--- a/src/op_mode/mtr.py
+++ b/src/op_mode/mtr.py
@@ -137,7 +137,7 @@ options = {
'tcp': {
'mtr': '{command} --tcp',
'type': 'noarg',
- 'help': ' Use TCP SYN packets instead of ICMP ECHO. PACKETSIZE is ignored, since SYN packets can not contain data.',
+ 'help': ' Use TCP SYN packets instead of ICMP ECHO. PACKETSIZE is ignored, since SYN packets cannot contain data.',
},
'sctp': {
'mtr': '{command} --sctp',
@@ -201,7 +201,7 @@ def completion_failure(option: str) -> None:
sys.exit(1)
-def expension_failure(option, completions):
+def expansion_failure(option, completions):
reason = 'Ambiguous' if completions else 'Invalid'
sys.stderr.write(
'\n\n {} command: {} [{}]\n\n'.format(reason, ' '.join(sys.argv), option)
@@ -224,7 +224,7 @@ def convert(command, args):
shortname = args.first()
longnames = complete(shortname)
if len(longnames) != 1:
- expension_failure(shortname, longnames)
+ expansion_failure(shortname, longnames)
longname = longnames[0]
if longname == 'json':
to_json = True
diff --git a/src/op_mode/show-bond.py b/src/op_mode/show-bond.py
index 19abc440a..e50a5c835 100755
--- a/src/op_mode/show-bond.py
+++ b/src/op_mode/show-bond.py
@@ -47,7 +47,7 @@ TMPL_INDIVIDUAL_BOND = """Interface RX: bytes packets TX: bytes pac
"""
if args.slaves and args.interface:
- exit('Can not use both --slaves and --interfaces option at the same time')
+ exit('Cannot use both --slaves and --interface option at the same time')
parser.print_help()
elif args.slaves: