Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/commands/clean
blob: fcfe1936ec971555111d9b6c70c34b5015f45aa3 (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
30
31
32
33
34
35
#!/usr/bin/python

import glob
import os

import common

from devbot import build
from devbot import config
from devbot import environ
from devbot import state
from devbot import config

common.setup()
build.clean()
environ.clean()
state.clean()
config.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