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

15 lines
256 B
Python
Raw Normal View History

2017-03-29 22:18:01 +01:00
import shutil
import os
2017-04-01 16:12:03 +01:00
import logging
logger = logging.getLogger(__file__)
2017-03-29 22:18:01 +01:00
def remove_dir(dir):
2017-04-01 16:12:03 +01:00
logger.debug("Removing directory {}.".format(dir))
2017-03-29 22:18:01 +01:00
try:
shutil.rmtree(dir)
os.rmdir(dir)
except FileNotFoundError:
pass