Index: third_party/libadblockplus_android/clear_cache.py |
diff --git a/third_party/libadblockplus_android/clear_cache.py b/third_party/libadblockplus_android/clear_cache.py |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a349a6aa1e272533cd0d8222a2d931645c339e19 |
--- /dev/null |
+++ b/third_party/libadblockplus_android/clear_cache.py |
@@ -0,0 +1,19 @@ |
+import os |
sergei
2018/01/16 17:29:08
Currently it looks like platform independent `rm -
anton
2018/01/17 06:00:07
Acknowledged.
|
+import sys |
+import shutil |
+ |
+ |
+def main(argv): |
+ directory = argv[0] |
+ if os.path.exists(directory): |
+ shutil.rmtree(directory) |
+ |
+ return 0 |
+ |
+ |
+if '__main__' == __name__: |
+ try: |
+ 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
|
+ except KeyboardInterrupt: |
+ sys.stderr.write('interrupted\n') |
+ sys.exit(1) |