From 07f237ba496428453896cdfaf9973c1a0590e10f Mon Sep 17 00:00:00 2001 From: Daniel Narvaez Date: Fri, 16 Nov 2012 14:24:40 +0000 Subject: Cleanup makefiles --- (limited to 'commands/clean') diff --git a/commands/clean b/commands/clean index fc29466..5fdee2f 100755 --- a/commands/clean +++ b/commands/clean @@ -1,8 +1,29 @@ #!/usr/bin/python +import glob +import os + import common from devbot import build +from devbot import config common.setup() build.clean() + +os.chdir(config.logs_dir) + +print "Deleting logs" + +try: + os.unlink("all-logs.tar.bz2") +except OSError: + # Migth not exist + pass + +for filename in glob.glob("*.log"): + try: + os.unlink(filename) + except OSError: + # Files migth not exist + pass -- cgit v0.9.1