Programmatic manipulation of the lsb fields

For better message composition.
This commit is contained in:
Carlos Nihelton 2022-05-24 14:21:18 -03:00
parent 2adc001693
commit 3c27982939
No known key found for this signature in database
GPG Key ID: 6FE346D245197E9A
1 changed files with 6 additions and 5 deletions

View File

@ -23,14 +23,13 @@ from subiquity.client.client import SubiquityClient
log = logging.getLogger('system_setup.client.client')
ABOUT_UBUNTU_WSL = _("""
Welcome to the Ubuntu WSL Installer!
Welcome to the {id} Installer!
A full Ubuntu environment, deeply integrated with Windows,
for Linux application development and execution.
Optimised for cloud, web, data science, IOT and fun!
The installer will guide you through installing Ubuntu WSL
{release} LTS.
The installer will guide you through installing {description}.
The installer only requires the up and down arrow keys, space (or
return) and the occasional bit of typing.
@ -41,9 +40,11 @@ This is version {snap_version} of the installer.
def _about_msg(msg, dry_run):
info = lsb_release(dry_run=dry_run)
newId = info["id"] + " WSL"
info.update({
'snap_version': os.environ.get("SNAP_VERSION", "SNAP_VERSION"),
'snap_revision': os.environ.get("SNAP_REVISION", "SNAP_REVISION"),
'id': newId,
'description': info["description"].replace(info["id"], newId),
'snap_version': os.environ.get("SNAP_VERSION", "SNAP_VERSION")
})
return msg.format(**info)