Use $XDG_CONFIG_HOME instead of hardcoded path (MR 1969)

This commit is contained in:
Ralf Rachinger 2020-08-23 13:51:42 +02:00
parent 86d61b8012
commit 72e24f7f96
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
3 changed files with 3 additions and 5 deletions

View file

@ -7,7 +7,6 @@ via SSH if expected processes are running.
We use an extra config file (based on ~/.config/pmbootstrap.cfg), because we
need to change it a lot (e.g. UI, username, ...).
"""
import os
import pytest
import sys
import shutil
@ -78,8 +77,7 @@ class QEMU(object):
def run(self, args, tmpdir, ui="none"):
# Copy and adjust user's pmbootstrap.cfg
config = str(tmpdir) + "/pmbootstrap.cfg"
shutil.copyfile(os.path.expanduser("~") + "/.config/pmbootstrap.cfg",
config)
shutil.copyfile(args.config, config)
pmbootstrap_run(args, config, ["config", "device", "qemu-amd64"])
pmbootstrap_run(args, config, ["config", "kernel", "virt"])
pmbootstrap_run(args, config, ["config", "extra_packages", "none"])