diff --git a/file/__init__.py b/file/__init__.py index f622b10..eaf0059 100644 --- a/file/__init__.py +++ b/file/__init__.py @@ -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):