X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fclean_suites.py;h=b5904836d6c98213143a76458a721a6256fdb7b5;hb=3764685fec61791e5ff9fa6f49393c358c105f7f;hp=143b0ff271b2c90921387a5becdb5a3fa9634b6b;hpb=e93b0e55b1f011afa330d3c0be68e75f72b6b75b;p=dak.git diff --git a/dak/clean_suites.py b/dak/clean_suites.py index 143b0ff2..b5904836 100755 --- a/dak/clean_suites.py +++ b/dak/clean_suites.py @@ -206,11 +206,12 @@ def clean(): sys.stdout.write("done. (%d seconds)]\n" % (int(time.time()-before))) # Delete files from the pool - query = "SELECT l.path, f.filename FROM location l, files f WHERE f.last_used <= '%s' AND l.id = f.location" % (delete_data) + query = "SELECT l.path, f.filename FROM location l, files f WHERE f.last_used <= '%s' AND l.id = f.location" % (delete_date) if max_delete is not None: - query += " LIMIT %d" % maximum - sys.stdout.write("Limiting removals to %d" % Cnf["Clean-Suites::Options::Maximum"]) + query += " LIMIT %d" % max_delete + sys.stdout.write("Limiting removals to %d\n" % max_delete) + q=projectB.query(query) for i in q.getresult(): filename = i[0] + i[1] if not os.path.exists(filename): @@ -355,7 +356,6 @@ def main(): if Options["Help"]: usage() - print max_delete projectB = pg.connect(Cnf["DB::Name"], Cnf["DB::Host"], int(Cnf["DB::Port"])) now_date = time.strftime("%Y-%m-%d %H:%M")