one-off format of long lines with black

This commit is contained in:
Dan Bungert 2023-07-25 15:27:30 -06:00
parent 34d40643ad
commit c08fdab2f8
38 changed files with 89 additions and 97 deletions

View File

@ -27,7 +27,7 @@ from subiquitycore.log import setup_logger
def parse_options(argv):
parser = argparse.ArgumentParser(
description=("console-conf - Pre-Ownership Configuration for Ubuntu Core"),
description="console-conf - Pre-Ownership Configuration for Ubuntu Core",
prog="console-conf",
)
parser.add_argument(

View File

@ -93,7 +93,7 @@ class ChooserCurrentSystemView(ChooserBaseView):
class ChooserView(ChooserBaseView):
excerpt = (
"Select one of available recovery systems and a desired " "action to execute."
"Select one of available recovery systems and a desired action to execute."
)
def __init__(self, controller, systems):
@ -173,7 +173,7 @@ class ChooserView(ChooserBaseView):
class ChooserConfirmView(ChooserBaseView):
canned_summary = {
"run": "Continue running the system without any changes.",
"recover": ("You have requested to reboot the system into recovery " "mode."),
"recover": "You have requested to reboot the system into recovery mode.",
"install": (
"You are about to {action_lower} the system version "
"{version} for {model} from {publisher}.\n\n"

View File

@ -24,7 +24,7 @@ from subiquitycore.view import BaseView
log = logging.getLogger("console_conf.ui.views.identity")
sso_help = (
"If you do not have an account, visit " "https://login.ubuntu.com to create one."
"If you do not have an account, visit https://login.ubuntu.com to create one."
)

View File

@ -82,10 +82,7 @@ class SSHController(SubiquityTuiController):
elif response.status == SSHFetchIdStatus.FINGERPRINT_ERROR:
if isinstance(self.ui.body, SSHView):
self.ui.body.fetching_ssh_keys_failed(
_(
"ssh-keygen failed to show fingerprint of"
" downloaded keys:"
),
_("ssh-keygen failed to show fingerprint of downloaded keys:"),
response.error,
)
return

View File

@ -119,7 +119,7 @@ def make_server_args_parser():
"--snap-section",
action="store",
default="server",
help=("Show snaps from this section of the store in the snap " "list screen."),
help="Show snaps from this section of the store in the snap list screen.",
)
parser.add_argument("--source-catalog", dest="source_catalog", action="store")
parser.add_argument(

View File

@ -109,8 +109,9 @@ def _make_handler(
for param_name, param in def_params.items():
if param_name in ("request", "context"):
raise Exception(
"api method {} cannot have parameter called request or "
"context".format(definition)
"api method {} cannot have parameter called request or context".format(
definition
)
)
if getattr(param.annotation, "__origin__", None) is Payload:
data_arg = param_name

View File

@ -159,9 +159,7 @@ def _can_edit_generic(device):
cd = device.constructed_device()
if cd is None:
return True
return _(
"Cannot edit {selflabel} as it is part of the {cdtype} " "{cdname}."
).format(
return _("Cannot edit {selflabel} as it is part of the {cdtype} {cdname}.").format(
selflabel=labels.label(device), cdtype=labels.desc(cd), cdname=labels.label(cd)
)
@ -193,7 +191,7 @@ def _can_edit_vg(vg):
if vg.preserve:
return _("Cannot edit pre-existing volume groups.")
elif len(vg._partitions) > 0:
return _("Cannot edit {vglabel} because it has logical " "volumes.").format(
return _("Cannot edit {vglabel} because it has logical volumes.").format(
vglabel=labels.label(vg)
)
else:
@ -249,7 +247,7 @@ def _can_remove_device(device):
return False
if cd.preserve:
return _(
"Cannot remove {selflabel} from pre-existing {cdtype} " "{cdlabel}."
"Cannot remove {selflabel} from pre-existing {cdtype} {cdlabel}."
).format(
selflabel=labels.label(device),
cdtype=labels.desc(cd),
@ -290,7 +288,7 @@ def _can_delete_generic(device):
if cd is None:
return True
return _(
"Cannot delete {selflabel} as it is part of the {cdtype} " "{cdname}."
"Cannot delete {selflabel} as it is part of the {cdtype} {cdname}."
).format(
selflabel=labels.label(device), cdtype=labels.desc(cd), cdname=labels.label(cd)
)
@ -330,7 +328,7 @@ def _can_delete_raid_vg(device):
)
if mounted_partitions > 1:
return _(
"Cannot delete {devicelabel} because it has {count} mounted " "partitions."
"Cannot delete {devicelabel} because it has {count} mounted partitions."
).format(devicelabel=labels.label(device), count=mounted_partitions)
elif mounted_partitions == 1:
return _(

View File

@ -83,7 +83,7 @@ class FilesystemManipulator:
if gap.in_extended:
if flag not in (None, "logical"):
log.debug(
f"overriding flag {flag} " "due to being in an extended partition"
f"overriding flag {flag} due to being in an extended partition"
)
flag = "logical"
part = self.model.add_partition(

View File

@ -46,7 +46,7 @@ class InconsistentMultiLayoutError(ValueError):
def __init__(self, layouts: str, variants: str) -> None:
super().__init__(
f'inconsistent multi-layout: layouts="{layouts}"' f' variants="{variants}"'
f'inconsistent multi-layout: layouts="{layouts}" variants="{variants}"'
)
@ -112,7 +112,7 @@ class KeyboardModel:
kbd_variant.code == variant for kbd_variant in kbd_layout.variants
):
raise ValueError(
f'Unknown keyboard variant "{variant}" ' f'for layout "{layout}"'
f'Unknown keyboard variant "{variant}" for layout "{layout}"'
)
def render_config_file(self):

View File

@ -284,7 +284,7 @@ class MirrorModel(object):
if "primary" in data and "mirror-selection" in data:
raise ValueError(
"apt->primary and apt->mirror-selection are" " mutually exclusive."
"apt->primary and apt->mirror-selection are mutually exclusive."
)
self.legacy_primary = "primary" in data

View File

@ -53,7 +53,7 @@ class NetworkModel(CoreNetworkModel):
r = {
"write_files": {
"etc_netplan_installer": {
"path": ("etc/cloud/cloud.cfg.d/90-installer-network.cfg"),
"path": "etc/cloud/cloud.cfg.d/90-installer-network.cfg",
"content": self.stringify_config(netplan),
"permissions": "0600",
},
@ -104,8 +104,7 @@ class NetworkModel(CoreNetworkModel):
cp = await arun_command(("nmcli", "networking"), check=True)
except subprocess.CalledProcessError as exc:
log.warning(
"failed to run nmcli networking,"
" considering NetworkManager disabled."
"failed to run nmcli networking, considering NetworkManager disabled."
)
log.debug("stderr: %s", exc.stderr)
return False

View File

@ -49,9 +49,7 @@ class ProxyModel(object):
},
"write_files": {
"snapd_dropin": {
"path": (
"etc/systemd/system/" "snapd.service.d/snap_proxy.conf"
),
"path": "etc/systemd/system/snapd.service.d/snap_proxy.conf",
"content": self.proxy_systemd_dropin(),
"permissions": 0o644,
},

View File

@ -243,7 +243,7 @@ class TestSubiquityModel(unittest.IsolatedAsyncioTestCase):
with self.assertRaises(SchemaValidationError) as ctx:
model._cloud_init_config()
expected_error = (
"Cloud config schema errors: bootcmd: 'nope' is not of type" " 'array'"
"Cloud config schema errors: bootcmd: 'nope' is not of type 'array'"
)
self.assertEqual(expected_error, str(ctx.exception))
@ -314,7 +314,7 @@ class TestSubiquityModel(unittest.IsolatedAsyncioTestCase):
cfg_files.remove("/etc/cloud/cloud.cfg.d/90-installer-network.cfg")
cfg_files.append("/etc/netplan/00-installer-config.yaml")
cfg_files.append(
"/etc/cloud/cloud.cfg.d/" "subiquity-disable-cloudinit-networking.cfg"
"/etc/cloud/cloud.cfg.d/subiquity-disable-cloudinit-networking.cfg"
)
expected_files[
"etc/cloud/clean.d/99-installer"
@ -379,7 +379,7 @@ class TestSubiquityModel(unittest.IsolatedAsyncioTestCase):
data={"bootcmd": "nope"}, data_source="system info"
)
expected_error = (
"Cloud config schema errors: bootcmd: 'nope' is not of" " type 'array'"
"Cloud config schema errors: bootcmd: 'nope' is not of type 'array'"
)
self.assertEqual(expected_error, str(ctx.exception))

View File

@ -401,7 +401,7 @@ class FilesystemController(SubiquityController, FilesystemManipulator):
raise Exception("autoinstall config did not mount root")
if self.model.needs_bootloader_partition():
raise Exception(
"autoinstall config did not create needed bootloader " "partition"
"autoinstall config did not create needed bootloader partition"
)
def update_devices(self, device_map):
@ -1160,7 +1160,7 @@ class FilesystemController(SubiquityController, FilesystemManipulator):
core_boot_caps.update(variation.capability_info.allowed)
if not core_boot_caps:
raise Exception(
"can only use name: hybrid when installing core boot " "classic"
"can only use name: hybrid when installing core boot classic"
)
if "mode" in layout:
raise Exception("cannot use 'mode' when installing core boot classic")
@ -1196,7 +1196,7 @@ class FilesystemController(SubiquityController, FilesystemManipulator):
break
else:
raise Exception(
"must use name: hybrid when installing core boot " "classic"
"must use name: hybrid when installing core boot classic"
)
mode = layout.get("mode", "reformat_disk")
self.validate_layout_mode(mode)

View File

@ -110,8 +110,9 @@ class IdentityController(SubiquityController):
validated = await self.validate_username_GET(data.username)
if validated != UsernameValidation.OK:
raise ValueError(
"Username <{}> is invalid and should not be"
" submitted.".format(data.username),
"Username <{}> is invalid and should not be submitted.".format(
data.username
),
validated,
)

View File

@ -666,7 +666,7 @@ class InstallController(SubiquityController):
[
"chroot",
self.tpath(),
"/usr/share/unattended-upgrades/" "unattended-upgrade-shutdown",
"/usr/share/unattended-upgrades/unattended-upgrade-shutdown",
"--stop-only",
]
)

View File

@ -231,7 +231,7 @@ class MirrorController(SubiquityController):
fallback = self.model.fallback
if fallback == MirrorSelectionFallback.ABORT:
log.error("aborting the install since no primary mirror is" " usable")
log.error("aborting the install since no primary mirror is usable")
# TODO there is no guarantee that raising this exception will
# actually abort the install. If this is raised from a request
# handler, for instance, it will just return a HTTP 500 error. For
@ -240,7 +240,7 @@ class MirrorController(SubiquityController):
raise RuntimeError("aborting install since no mirror is usable")
elif fallback == MirrorSelectionFallback.OFFLINE_INSTALL:
log.warning(
"reverting to an offline install since no primary" " mirror is usable"
"reverting to an offline install since no primary mirror is usable"
)
self.app.base_model.network.force_offline = True
elif fallback == MirrorSelectionFallback.CONTINUE_ANYWAY:

View File

@ -134,7 +134,7 @@ class OEMController(SubiquityController):
variant: str = self.app.base_model.source.current.variant
fs_controller = self.app.controllers.Filesystem
if fs_controller.is_core_boot_classic():
log.debug("listing of OEM meta-packages disabled on core boot" " classic")
log.debug("listing of OEM meta-packages disabled on core boot classic")
self.model.metapkgs = []
return
if not self.model.install_on[variant]:

View File

@ -137,7 +137,7 @@ class RefreshController(SubiquityController):
and snap.channel != expected_channel
):
log.debug(
f"snap tracking {snap.channel}, not resetting based " "on .disk/info"
f"snap tracking {snap.channel}, not resetting based on .disk/info"
)
return
desc = "switching {} to {}".format(self.snap_name, channel)

View File

@ -154,8 +154,10 @@ class MockedUAInterfaceStrategy(UAInterfaceStrategy):
"result": "failure",
"errors": [
{
"title": "The magic attach token is invalid, has "
" expired or never existed",
"title": (
"The magic attach token is invalid, has "
" expired or never existed"
),
"code": "magic-attach-token-error",
},
],

View File

@ -155,8 +155,7 @@ class DriversView(BaseView):
)
excerpt = _(
"The following third-party drivers were found. "
"Do you want to install them?"
"The following third-party drivers were found. Do you want to install them?"
)
def on_cancel(_: DriversForm) -> None:

View File

@ -194,9 +194,8 @@ class CompoundDiskForm(Form):
potential_boot_disks.add(d)
if not potential_boot_disks - set(mdc.value):
return _(
"\
If you put all disks into RAIDs or LVM VGs, there will be nowhere \
to put the boot partition."
"If you put all disks into RAIDs or LVM VGs, there will be nowhere"
" to put the boot partition."
)

View File

@ -49,9 +49,9 @@ class ConfirmDeleteStretchy(Stretchy):
if m is not None:
lines.append(
Text(
_(
"It is formatted as {fstype} and mounted at " "{path}"
).format(fstype=fs.fstype, path=m.path)
_("It is formatted as {fstype} and mounted at {path}").format(
fstype=fs.fstype, path=m.path
)
)
)
else:
@ -127,7 +127,7 @@ class ConfirmReformatStretchy(Stretchy):
m = fs.mount()
if m is not None:
lines.append(
_("It is formatted as {fstype} and mounted at " "{path}").format(
_("It is formatted as {fstype} and mounted at {path}").format(
fstype=fs.fstype, path=m.path
)
)
@ -147,7 +147,7 @@ class ConfirmReformatStretchy(Stretchy):
things=things, obj=labels.desc(obj)
)
lines = [
_("Do you really want to remove all {things} from " "{obj}?").format(
_("Do you really want to remove all {things} from {obj}?").format(
things=things, obj=labels.label(obj)
),
"",

View File

@ -88,7 +88,7 @@ class VolGroupForm(CompoundDiskForm):
def validate_devices(self):
if len(self.devices.value) < 1:
return _("Select at least one device to be part of the volume " "group.")
return _("Select at least one device to be part of the volume group.")
def validate_name(self):
v = self.name.value
@ -102,9 +102,7 @@ class VolGroupForm(CompoundDiskForm):
)
if v in (".", "..", "md") or os.path.exists("/dev/" + v):
if v not in self.deleted_vg_names:
return _("{name} is not a valid name for a volume " "group").format(
name=v
)
return _("{name} is not a valid name for a volume group").format(name=v)
def validate_passphrase(self):
if self.encrypt.value and len(self.passphrase.value) < 1:

View File

@ -258,7 +258,7 @@ class PartitionForm(Form):
]:
if substring in v:
return _(
"The name of a logical volume may not contain " '"{substring}"'
'The name of a logical volume may not contain "{substring}"'
).format(substring=substring)
if v in self.lvm_names:
return _("There is already a logical volume named {name}.").format(

View File

@ -55,7 +55,7 @@ class RaidnameEditor(StringEditor, WantsToKnowFormField):
if len(ch) == 1 and ch == "/":
self.bff.in_error = True
self.bff.show_extra(
("info_error", _("/ is not permitted " "in the name of a RAID device"))
("info_error", _("/ is not permitted in the name of a RAID device"))
)
return False
elif len(ch) == 1 and ch.isspace():
@ -63,7 +63,7 @@ class RaidnameEditor(StringEditor, WantsToKnowFormField):
self.bff.show_extra(
(
"info_error",
_("Whitespace is not permitted in the " "name of a RAID device"),
_("Whitespace is not permitted in the name of a RAID device"),
)
)
return False
@ -104,7 +104,7 @@ class RaidForm(CompoundDiskForm):
active_device_count = len(self.devices.widget.active_devices)
if active_device_count < self.level.value.min_devices:
return _(
'RAID Level "{level}" requires at least {min_active} active' " devices"
'RAID Level "{level}" requires at least {min_active} active devices'
).format(
level=self.level.value.name, min_active=self.level.value.min_devices
)

View File

@ -45,7 +45,7 @@ class RealnameEditor(StringEditor, WantsToKnowFormField):
self.bff.show_extra(
(
"info_error",
_("The characters : , and = are not permitted" " in this field"),
_("The characters : , and = are not permitted in this field"),
)
)
return False
@ -91,7 +91,7 @@ class UsernameEditor(StringEditor, _AsyncValidatedMixin, WantsToKnowFormField):
def __init__(self):
self.valid_char_pat = r"[-a-z0-9_]"
self.error_invalid_char = _(
"The only characters permitted in this " "field are a-z, 0-9, _ and -"
"The only characters permitted in this field are a-z, 0-9, _ and -"
)
super().__init__()

View File

@ -35,7 +35,7 @@ from subiquitycore.view import BaseView
log = logging.getLogger("subiquity.ui.views.mirror")
mirror_help = _(
"You may provide an archive mirror that will be used instead " "of the default."
"You may provide an archive mirror that will be used instead of the default."
)
MIRROR_CHECK_CONFIRMATION_TEXTS = {
@ -80,11 +80,10 @@ class MirrorForm(Form):
# * the status of the mirror check (or None if it hasn't started yet)
MIRROR_CHECK_STATUS_TEXTS = {
(False, None): _(
"The mirror location cannot be checked because no network"
" has been configured."
"The mirror location cannot be checked because no network has been configured."
),
(True, None): _("The mirror location has not yet started."),
(True, MirrorCheckStatus.RUNNING): _("The mirror location is being" " tested."),
(True, MirrorCheckStatus.RUNNING): _("The mirror location is being tested."),
(True, MirrorCheckStatus.OK): _("This mirror location passed tests."),
(True, MirrorCheckStatus.FAILED): _(
"""\
@ -98,9 +97,7 @@ explain the problem. You can try again once the issue has been fixed
class MirrorView(BaseView):
title = _("Configure Ubuntu archive mirror")
excerpt = _(
"If you use an alternative mirror for Ubuntu, enter its " "details here."
)
excerpt = _("If you use an alternative mirror for Ubuntu, enter its details here.")
def __init__(
self,

View File

@ -47,7 +47,7 @@ _ssh_import_data = {
"help": _("Enter your GitHub username."),
"valid_char": r"[a-zA-Z0-9\-]",
"error_invalid_char": _(
"A GitHub username may only contain " "alphanumeric characters or hyphens."
"A GitHub username may only contain alphanumeric characters or hyphens."
),
},
"lp": {

View File

@ -193,7 +193,7 @@ class UpgradeYesNoForm(Form):
group,
_("Skip for now"),
help="\n"
+ _("You can always enable Ubuntu Pro later via the" " 'pro attach' command."),
+ _("You can always enable Ubuntu Pro later via the 'pro attach' command."),
)
@ -388,9 +388,7 @@ class UbuntuProView(BaseView):
" STIG, HIPAA and other compliance or hardening"
" requirements."
)
excerpt_no_net = _(
"An Internet connection is required to enable" " Ubuntu Pro."
)
excerpt_no_net = _("An Internet connection is required to enable Ubuntu Pro.")
about_pro_btn = menu_btn(
_("About Ubuntu Pro"), on_press=lambda unused: self.show_about_ubuntu_pro()
@ -688,7 +686,7 @@ class ExpiredTokenWidget(Stretchy):
self.parent = parent
cont = done_btn(label=_("Okay"), on_press=lambda unused: self.close())
widgets = [
Text(_("Your token has expired. Please use another token" " to continue.")),
Text(_("Your token has expired. Please use another token to continue.")),
Text(""),
button_pile([cont]),
]
@ -814,7 +812,7 @@ class AboutProWidget(Stretchy):
_("10 years of security patch coverage (extended from 5 years)."),
_("Kernel Livepatch to reduce required reboots."),
_("Ubuntu Security Guide for CIS and DISA-STIG hardening."),
_("FIPS 140-2 NIST-certified crypto-modules for FedRAMP" " compliance"),
_("FIPS 140-2 NIST-certified crypto-modules for FedRAMP compliance"),
]
def itemize(item: str, marker: str = "") -> Columns:
@ -834,7 +832,7 @@ class AboutProWidget(Stretchy):
Text(""),
Pile([itemize(svc, marker="") for svc in services]),
Text(""),
Text(_("Ubuntu Pro is free for personal use on up to 3" " machines.")),
Text(_("Ubuntu Pro is free for personal use on up to 3 machines.")),
Text(_("More information is at ubuntu.com/pro")),
Text(""),
button_pile([ok]),

View File

@ -374,8 +374,7 @@ class BaseNetworkController(BaseController):
await arun_command(["netplan", "apply"], env=env, check=True)
except subprocess.CalledProcessError as cpe:
log.debug(
"CalledProcessError: "
f"stdout[{cpe.stdout}] stderr[{cpe.stderr}]"
f"CalledProcessError: stdout[{cpe.stdout}] stderr[{cpe.stderr}]"
)
error("apply")
raise

View File

@ -500,7 +500,7 @@ class NetworkView(BaseView):
)
elif action == "timeout":
self.error.set_text(
"Network configuration timed out; " "please verify your settings."
"Network configuration timed out; please verify your settings."
)
elif action == "down":
self.error.set_text("Downing network interfaces failed.")
@ -510,7 +510,7 @@ class NetworkView(BaseView):
self.error.set_text("Failed to delete a virtual interface.")
else:
self.error.set_text(
"An unexpected error has occurred; " "please verify your settings."
"An unexpected error has occurred; please verify your settings."
)
def done(self, result=None):

View File

@ -222,7 +222,7 @@ def crypt_password(passwd, algo="SHA-512"):
)
)
salt_set = "abcdefghijklmnopqrstuvwxyz" "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "0123456789./"
salt_set = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./"
salt = 16 * " "
salt = "".join([random.choice(salt_set) for c in salt])
return crypt.crypt(passwd, algos[algo] + salt)

View File

@ -38,8 +38,10 @@ def make_server_args_parser():
parser.add_argument(
"--prefill",
dest="prefill",
help="Prefills UI models with data provided in"
" a prefill.yaml file yet allowing overrides.",
help=(
"Prefills UI models with data provided in"
" a prefill.yaml file yet allowing overrides."
),
)
parser.add_argument(
"--output-base",
@ -54,9 +56,11 @@ def make_server_args_parser():
type=int,
choices=range(49152, 60999),
metavar="[49152 to 60999]",
help="The TCP port Subiquity must listen to. It means "
"TCP will be used instead of Unix domain sockets. "
"Only localhost connections are accepted.",
help=(
"The TCP port Subiquity must listen to. It means "
"TCP will be used instead of Unix domain sockets. "
"Only localhost connections are accepted."
),
)
return parser

View File

@ -55,8 +55,10 @@ def make_client_args_parser():
parser.add_argument(
"--prefill",
dest="prefill",
help="Prefills UI models with data provided in"
" a prefill.yaml file yet allowing overrides.",
help=(
"Prefills UI models with data provided in"
" a prefill.yaml file yet allowing overrides."
),
)
parser.add_argument(
"--output-base",

View File

@ -166,7 +166,7 @@ class ConfigureController(SubiquityController):
envcp = None
if not os.path.exists(data_dir):
log.error(
"Language selector data dir %s seems not to be part" " of the snap.",
"Language selector data dir %s seems not to be part of the snap.",
data_dir,
)
# Try seeded L-S-C
@ -405,7 +405,7 @@ class ConfigureController(SubiquityController):
assign_grp_proc = await arun_command(assign_grp_cmd, env=env)
if assign_grp_proc.returncode != 0:
raise Exception(
("Failed to assign group to user %s: %s")
"Failed to assign group to user %s: %s"
% (username, assign_grp_proc.stderr)
)

View File

@ -70,7 +70,7 @@ class WSLConfigurationAdvancedForm(Form):
class WSLConfigurationAdvancedView(BaseView):
title = _("WSL Configuration - Advanced options")
excerpt = _(
"In this page, you can configure Ubuntu WSL " "advanced options your needs. \n"
"In this page, you can configure Ubuntu WSL advanced options your needs. \n"
)
def __init__(self, controller, configuration_data):

View File

@ -38,21 +38,21 @@ class WSLConfBaseForm(Form):
_("Mount Location"), help=_("Location for the automount")
)
automount_options = StringField(
_("Mount Option"), help=_("Mount option passed " "for the automount")
_("Mount Option"), help=_("Mount option passed for the automount")
)
network_generatehosts = BooleanField(
_("Enable Host Generation"),
help=_("Selecting enables /etc/host re-generation at" " every start"),
help=_("Selecting enables /etc/host re-generation at every start"),
)
network_generateresolvconf = BooleanField(
_("Enable resolv.conf Generation"),
help=_("Selecting enables /etc/resolv.conf re-generation" " at every start"),
help=_("Selecting enables /etc/resolv.conf re-generation at every start"),
)
def validate_automount_root(self):
p = self.automount_root.value
if p != "" and (re.fullmatch(r"(/[^/ ]*)+/?", p) is None):
return _("Mount location must be a absolute UNIX path" " without space.")
return _("Mount location must be a absolute UNIX path without space.")
def validate_automount_options(self):
o = self.automount_options.value