1 from os.path import abspath, join, exists
2 from shutil import rmtree
3 from waiter.settings import WAITER_ROOT
6 def check_abspath(path):
7 abs_path = abspath(join(WAITER_ROOT, path))
8 if not abs_path.startswith(WAITER_ROOT):
9 raise ValueError('Path not inside WAITER_ROOT.')
13 def clear_cache(path):
14 abs_path = check_abspath(path)