Merge pull request #1201 from ogayot/fix-ud-await

Fix not awaited ubuntu-drivers command existence check
This commit is contained in:
Olivier Gayot 2022-03-08 10:56:31 +01:00 committed by GitHub
commit 9a5e5b3406
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -78,7 +78,7 @@ class DriversController(SubiquityController):
async with apt.overlay() as d:
try:
# Make sure ubuntu-drivers is available.
self.ubuntu_drivers.ensure_cmd_exists(d.mountpoint)
await self.ubuntu_drivers.ensure_cmd_exists(d.mountpoint)
except CommandNotFoundError:
self.drivers = []
else:

View File

@ -138,7 +138,9 @@ class UbuntuDriversRunDriversInterface(UbuntuDriversInterface):
# TODO This does not tell us if the "--recommended" option is
# available.
try:
await arun_command(["command", "-v", "ubuntu-drivers"])
await arun_command(
["sh", "-c", "command -v ubuntu-driver"],
check=True)
except subprocess.CalledProcessError:
raise CommandNotFoundError(
"Command ubuntu-drivers is not available in this system")