This commit is contained in:
Marc Beninca 2023-07-17 23:07:42 +02:00
parent cb48fd3e62
commit deb709d488

View file

@ -6,7 +6,7 @@ CHARSET = 'UTF-8'
def create_image(file_path: str, size_bytes: int):
subprocess.call([
subprocess.run([
'qemu-img',
'create',
'-f', 'qcow2',
@ -28,6 +28,8 @@ def wipe(path: str):
shutil.rmtree(path)
except NotADirectoryError:
os.remove(path)
except FileNotFoundError:
pass
def write(file_path: str, text: str, charset=CHARSET):