From f87a4b9a04729e9100c914855f4d2665ac00ee46 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Fri, 3 Jul 2015 14:40:32 +0800 Subject: [PATCH] One failing rm should not block others --- script/clean.py | 13 +++++-------- script/lib/util.py | 2 ++ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/script/clean.py b/script/clean.py index 094f70df7a2e..cd72230a3715 100755 --- a/script/clean.py +++ b/script/clean.py @@ -11,14 +11,11 @@ SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) def main(): os.chdir(SOURCE_ROOT) - try: - rm_rf('node_modules') - rm_rf('dist') - rm_rf('out') - rm_rf('spec/node_modules') - rm_rf('vendor/brightray/vendor/download/libchromiumcontent') - except WindowsError: # pylint: disable=E0602 - pass + rm_rf('node_modules') + rm_rf('dist') + rm_rf('out') + rm_rf('spec/node_modules') + rm_rf('vendor/brightray/vendor/download/libchromiumcontent') if __name__ == '__main__': diff --git a/script/lib/util.py b/script/lib/util.py index a995b605613b..5e8933d0302f 100644 --- a/script/lib/util.py +++ b/script/lib/util.py @@ -136,6 +136,8 @@ def rm_rf(path): except OSError as e: if e.errno != errno.ENOENT: raise + except WindowsError: # pylint: disable=E0602 + pass def safe_unlink(path):