]> khamidou — GitHub mirrors - electron.git/commitdiff
WindowsError is undefined on POSIX
authorCheng Zhao <zcbenz@gmail.com>
Fri, 3 Jul 2015 06:54:32 +0000 (14:54 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Fri, 3 Jul 2015 06:54:32 +0000 (14:54 +0800)
script/lib/util.py

index a79a40f7ebc691b58a929f7a8dc3adb832fcdd8b..109e7254017dc350b3bf7e409ef98fb77a4ae87e 100644 (file)
@@ -133,10 +133,8 @@ def make_zip(zip_file_path, files, dirs):
 def rm_rf(path):
   try:
     shutil.rmtree(path)
-  except WindowsError:  # pylint: disable=E0602
-    pass
   except OSError as e:
-    if e.errno != errno.ENOENT:
+    if e.errno != errno.ENOENT and e.errno != errno.EIO:
       raise