Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/commands/clean
blob: 2fa1d6190eb9e8868aa69850f3275eb4e5e465e4 (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
36
#!/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()

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

build.clean()
environ.clean()
state.clean()
config.clean()