1 |
|
from crab_exceptions import * |
2 |
< |
#from threading import RLock |
2 |
> |
import logging |
3 |
|
import common |
4 |
< |
import os, shutil, string, time |
4 |
> |
import os, string, time |
5 |
|
|
6 |
|
class WorkSpace: |
7 |
|
def __init__(self, top_dir, cfg_params): |
94 |
|
""" |
95 |
|
delete the whole workspace without doing any test!!! |
96 |
|
""" |
97 |
< |
common.logger.quiet(1) |
98 |
< |
common.logger.close() |
97 |
> |
logging.shutdown() |
98 |
|
if os.path.exists(self._top_dir): |
99 |
< |
# shutil.rmtree(self._top_dir) |
100 |
< |
# os.system("/usr/sbin/lsof %s/crab.log" % self._log_dir ) |
102 |
< |
os.system("rm -rf %s" % self._top_dir ) |
103 |
< |
# SL For some obscure reason the lgo dir is not removed at the first try |
104 |
< |
os.system("rm -rf %s" % self._top_dir ) |
99 |
> |
import shutil |
100 |
> |
shutil.rmtree(self._top_dir) |
101 |
|
pass |
102 |
|
return |
103 |
|
|