47 cleanupSource(name) |
47 cleanupSource(name) |
48 if len(os.listdir(name)) == 0: |
48 if len(os.listdir(name)) == 0: |
49 os.rmdir(name) |
49 os.rmdir(name) |
50 |
50 |
51 |
51 |
52 def main(argv): |
52 def main(): |
53 """ |
53 """ |
54 The main function of the script. |
54 The main function of the script. |
55 |
|
56 @param argv the list of command line arguments. |
|
57 """ |
55 """ |
58 print("Cleaning up source ...") |
56 print("Cleaning up source ...") |
59 sourceDir = os.path.dirname(os.path.dirname(__file__)) or "." |
57 sourceDir = os.path.dirname(os.path.dirname(__file__)) or "." |
60 cleanupSource(sourceDir) |
58 cleanupSource(sourceDir) |
61 |
59 |
62 |
60 |
63 if __name__ == "__main__": |
61 if __name__ == "__main__": |
64 try: |
62 try: |
65 main(sys.argv) |
63 main() |
66 except SystemExit: |
64 except SystemExit: |
67 raise |
65 raise |
68 except Exception: |
66 except Exception: |
69 print( |
67 print( |
70 "\nAn internal error occured. Please report all the output of the" |
68 "\nAn internal error occured. Please report all the output of the" |