This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
md-pdf/md_pdf/utils.py
2017-04-01 16:12:03 +01:00

15 lines
256 B
Python

import shutil
import os
import logging
logger = logging.getLogger(__file__)
def remove_dir(dir):
logger.debug("Removing directory {}.".format(dir))
try:
shutil.rmtree(dir)
os.rmdir(dir)
except FileNotFoundError:
pass