Mercurial > repos > yating-l > hubarchivecreator
comparison util/cleanDirectory.py @ 0:3e0c61b52a06 draft
planemo upload for repository https://github.com/Yating-L/hub-archive-creator commit a77635b40ebd29baafb3bea57f8cbfb3f252e3b0-dirty
author | yating-l |
---|---|
date | Mon, 31 Oct 2016 16:36:25 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:3e0c61b52a06 |
---|---|
1 #!/usr/bin/python | |
2 """Use to clean the directory after the run of HubArchiveCreator.py manually""" | |
3 import os | |
4 import shutil | |
5 | |
6 # Remove 'myHub.zip at root folder | |
7 try: | |
8 os.remove('myHub.zip') | |
9 except OSError as o: | |
10 # We don't need to crash the program | |
11 print 'Warning: ' + str(o) | |
12 | |
13 # Remove 'myHub' folder and its content | |
14 shutil.rmtree('myHub', ignore_errors=True) |