diff --git a/src/pylorax/sysutils.py b/src/pylorax/sysutils.py index 1813ec2e..cde3c85d 100644 --- a/src/pylorax/sysutils.py +++ b/src/pylorax/sysutils.py @@ -135,3 +135,9 @@ def cpfile(src, dst): dst = joinpaths(dst, os.path.basename(src)) return dst + +def remove(target): + if os.path.isdir(target): + shutil.rmtree(target) + else: + os.unlink(target)