appypod-rattail/bin/clean.py

24 lines
1,008 B
Python
Raw Normal View History

2009-06-29 07:06:01 -05:00
# Imports ----------------------------------------------------------------------
import os, os.path
from appy.shared import appyPath
from appy.shared.utils import FolderDeleter, cleanFolder
2009-06-29 07:06:01 -05:00
# ------------------------------------------------------------------------------
class Cleaner:
def run(self, verbose=True):
cleanFolder(appyPath, verbose=True)
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()
# ------------------------------------------------------------------------------