]> khamidou — GitHub mirrors - electron.git/commitdiff
One failing rm should not block others
authorCheng Zhao <zcbenz@gmail.com>
Fri, 3 Jul 2015 06:40:32 +0000 (14:40 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Fri, 3 Jul 2015 06:40:32 +0000 (14:40 +0800)
script/clean.py
script/lib/util.py

index 094f70df7a2ea1c0e32ab748555d6c345f361676..cd72230a3715a94a96678a5ae590c3a30a4ed315 100755 (executable)
@@ -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__':
index a995b605613b2f6c4cbe190f6636db8f0f6eb679..5e8933d0302f0726ce99f14250d94c77091b582f 100644 (file)
@@ -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):