Let's use this util's method and avoid creating the cache dir by our own. Signed-off-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx> --- virtinst/unattended.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/virtinst/unattended.py b/virtinst/unattended.py index 11de2fed..e79c1a47 100644 --- a/virtinst/unattended.py +++ b/virtinst/unattended.py @@ -264,10 +264,7 @@ def prepare_install_script(guest, unattended_data, url=None, os_media=None): def generate_install_script(script): - scratch = os.path.join(util.get_cache_dir(), "unattended") - if not os.path.exists(scratch): - os.makedirs(scratch, 0o751) - + scratch = util.make_unattended_cache_dir() script.generate_output(Gio.File.new_for_path(scratch)) path = os.path.join(scratch, script.get_expected_filename()) cmdline = script.generate_cmdline() -- 2.21.0 _______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list