2009-06-29 07:06:01 -05:00
|
|
|
# Imports ----------------------------------------------------------------------
|
|
|
|
import os, os.path
|
|
|
|
from appy.shared import appyPath
|
2010-04-01 06:46:50 -05:00
|
|
|
from appy.shared.utils import FolderDeleter, cleanFolder
|
2009-06-29 07:06:01 -05:00
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
class Cleaner:
|
|
|
|
def run(self, verbose=True):
|
2010-11-26 10:30:46 -06:00
|
|
|
cleanFolder(appyPath, verbose=verbose)
|
2009-06-29 07:06:01 -05:00
|
|
|
# Remove all files in temp folders
|
|
|
|
for tempFolder in ('%s/temp' % appyPath,
|
|
|
|
'%s/pod/test/temp' % appyPath):
|
|
|
|
if os.path.exists(tempFolder):
|
|
|
|
FolderDeleter.delete(tempFolder)
|
|
|
|
# Remove test reports if any
|
|
|
|
for testReport in ('%s/pod/test/Tester.report.txt' % appyPath,):
|
|
|
|
if os.path.exists(testReport):
|
|
|
|
os.remove(testReport)
|
|
|
|
|
|
|
|
# Main program -----------------------------------------------------------------
|
|
|
|
if __name__ == '__main__':
|
|
|
|
Cleaner().run()
|
|
|
|
# ------------------------------------------------------------------------------
|