wipe/run
This commit is contained in:
parent
cb48fd3e62
commit
deb709d488
1 changed files with 3 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue