CMLAB-Cleaner/check_tmp
2024-09-03 17:19:09 +08:00

19 lines
399 B
Python
Executable File

#!/usr/bin/python3
from src.cleaner import Cleaner
import os
username = os.getlogin()
print(username)
for tmp_main_dir in ['/tmp2', '/tmp3']:
student_dir = f'{tmp_main_dir}/{username}'
if os.path.isdir(student_dir):
print(student_dir)
cleaner = Cleaner(student_dir)
cleaner.run(remove=False, notify=False)
else:
print(f"{student_dir} doesn't exist")