clear_tmp now properly removes the tmp capture tree
This commit is contained in:
parent
7cf54240be
commit
62b70e5bae
1 changed files with 2 additions and 4 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import uuid
|
||||
import io
|
||||
import os
|
||||
import shutil
|
||||
import glob
|
||||
import datetime
|
||||
import yaml
|
||||
|
|
@ -25,10 +26,7 @@ def clear_tmp():
|
|||
global TEMP_CAPTURE_PATH
|
||||
|
||||
logging.info("Clearing {}...".format(TEMP_CAPTURE_PATH))
|
||||
files = glob.glob('{}/*'.format(TEMP_CAPTURE_PATH))
|
||||
for f in files:
|
||||
os.remove(f)
|
||||
logging.debug("Removed {}".format(f))
|
||||
shutil.rmtree(TEMP_CAPTURE_PATH)
|
||||
logging.debug("Cleared {}.".format(TEMP_CAPTURE_PATH))
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue