Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/commands/clean
blob: 5fdee2f6883f1097d890af7093c4cdce1fa34445 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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