X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/7ef4abfc9ef8f8835f83cec90040a8d91a659d00..357027375ff8867f42ca34bcbfb5a78b5b185fc3:/apps/waiter/utils.py diff --git a/apps/waiter/utils.py b/apps/waiter/utils.py deleted file mode 100644 index 0957e9d80..000000000 --- a/apps/waiter/utils.py +++ /dev/null @@ -1,17 +0,0 @@ -from os.path import abspath, join, exists -from shutil import rmtree -from waiter.settings import WAITER_ROOT - - -def check_abspath(path): - abs_path = abspath(join(WAITER_ROOT, path)) - if not abs_path.startswith(WAITER_ROOT): - raise ValueError('Path not inside WAITER_ROOT.') - return abs_path - - -def clear_cache(path): - abs_path = check_abspath(path) - if exists(abs_path): - rmtree(abs_path) -