]> git.pld-linux.org Git - projects/pld-ftp-admin.git/blame - bin/pfa-maintainer
Fix exception handling syntax (python3 compat)
[projects/pld-ftp-admin.git] / bin / pfa-maintainer
CommitLineData
9c170c61 1#!/usr/bin/env python3
21dae1e5
MM
2# vi: encoding=utf-8 ts=8 sts=4 sw=4 et
3
4import sys, os
5sys.path.insert(0, os.environ['HOME']+'/pld-ftp-admin/modules')
6import time
7from config import test_builds_dir, ftp_archs
8
9def clean_dir(path, max):
10 curtime=time.time()
11 for i in os.listdir(path):
12 if curtime - os.path.getmtime(path+'/'+i) > max:
13 os.unlink(path+'/'+i)
14
15for arch in ftp_archs + ['SRPMS']:
16 clean_dir(test_builds_dir+arch, 60*60*24*3)
17
This page took 0.73631 seconds and 4 git commands to generate.