Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: third_party/libadblockplus_common/delete_dir.py

Issue 29674558: Issue 6286 - Remove common scripts duplicating (Closed)
Patch Set: Created Jan. 19, 2018, 8:03 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 import os 1 import os
2 import sys 2 import sys
3 import shutil 3 import shutil
4 4
5 5
6 def main(argv): 6 def main(argv):
7 directory = argv[0] 7 directory = argv[0]
8 if os.path.exists(directory): 8 if os.path.exists(directory):
9 shutil.rmtree(directory) 9 shutil.rmtree(directory)
10 10
11 return 0 11 return 0
12 12
13 13
14 if '__main__' == __name__: 14 if '__main__' == __name__:
15 try: 15 try:
16 sys.exit(main(sys.argv[1:])) 16 sys.exit(main(sys.argv[1:]))
17 except KeyboardInterrupt: 17 except KeyboardInterrupt:
18 sys.stderr.write('interrupted\n') 18 sys.stderr.write('interrupted\n')
19 sys.exit(1) 19 sys.exit(1)
OLDNEW

Powered by Google App Engine
This is Rietveld