summaryrefslogtreecommitdiff
path: root/cloudinit/tests/helpers.py
diff options
context:
space:
mode:
authorChad Smith <chad.smith@canonical.com>2019-08-22 17:09:22 +0000
committerServer Team CI Bot <josh.powers+server-team-bot@canonical.com>2019-08-22 17:09:22 +0000
commite6383719c1adccf20b5c21cfba1c5a2462d663a2 (patch)
treeac5f962aa9b71c2f48f5b2ed67e0368a508f843e /cloudinit/tests/helpers.py
parent3e998276e42f5e2a4fa3a09becc9f120363e22de (diff)
downloadvyos-cloud-init-e6383719c1adccf20b5c21cfba1c5a2462d663a2.tar.gz
vyos-cloud-init-e6383719c1adccf20b5c21cfba1c5a2462d663a2.zip
ubuntu-drivers: call db_x_loadtemplatefile to accept NVIDIA EULA
Emit a script allowing cloud-init to set linux/nvidia/latelink debconf selection to true. This avoids having to call debconf-set-selections and allows cloud-init to pre-confgure linux-restricted-modules to link NVIDIA drivers to the running kernel. Cloud-init loads this debconf template and sets the value to true in the debconf database by sourcing debconf's /usr/share/debconf/confmodule and uses db_x_loadtemplatefile to register cloud-init's setting for linux/nvidia/latelink. LP: #1840080
Diffstat (limited to 'cloudinit/tests/helpers.py')
-rw-r--r--cloudinit/tests/helpers.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/cloudinit/tests/helpers.py b/cloudinit/tests/helpers.py
index f41180fd..23fddd07 100644
--- a/cloudinit/tests/helpers.py
+++ b/cloudinit/tests/helpers.py
@@ -198,7 +198,8 @@ class CiTestCase(TestCase):
prefix="ci-%s." % self.__class__.__name__)
else:
tmpd = tempfile.mkdtemp(dir=dir)
- self.addCleanup(functools.partial(shutil.rmtree, tmpd))
+ self.addCleanup(
+ functools.partial(shutil.rmtree, tmpd, ignore_errors=True))
return tmpd
def tmp_path(self, path, dir=None):