Mercurial > repos > yating-l > hub_test
comparison util/cleanDirectory.py @ 0:abcfd662b679 draft default tip
planemo upload for repository https://github.com/Yating-L/hubarchivecreator-test.git commit 199ae2b10f3b3e58cb4d4a3b9fb4b35db415c538-dirty
| author | yating-l |
|---|---|
| date | Thu, 22 Dec 2016 17:53:00 -0500 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:abcfd662b679 |
|---|---|
| 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) |
