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

Side by Side Diff: third_party/libadblockplus_android/clear_cache.py

Issue 29670555: Issue 6264 - Can't prepare libadblockplus dependencies (Closed)
Patch Set: Formatted with respect to eyeo python code style and tested with flake8 Created Jan. 16, 2018, 8:37 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
(Empty)
1 import os
sergei 2018/01/16 17:29:08 Currently it looks like platform independent `rm -
anton 2018/01/17 06:00:07 Acknowledged.
2 import sys
3 import shutil
4
5
6 def main(argv):
7 directory = argv[0]
8 if os.path.exists(directory):
9 shutil.rmtree(directory)
10
11 return 0
12
13
14 if '__main__' == __name__:
15 try:
16 sys.exit(main(sys.argv[1:]))
sergei 2018/01/16 17:29:08 What if remove sys.exit and `return 0` from `main`
anton 2018/01/17 06:00:07 I've tried to keep Chromium code style and it's us
17 except KeyboardInterrupt:
18 sys.stderr.write('interrupted\n')
19 sys.exit(1)
OLDNEW

Powered by Google App Engine
This is Rietveld