]> khamidou — GitHub mirrors - electron.git/commitdiff
WindowsError is a subclass of OSError
authorCheng Zhao <zcbenz@gmail.com>
Fri, 3 Jul 2015 06:46:26 +0000 (14:46 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Fri, 3 Jul 2015 06:46:26 +0000 (14:46 +0800)
script/lib/util.py

index 5e8933d0302f0726ce99f14250d94c77091b582f..a79a40f7ebc691b58a929f7a8dc3adb832fcdd8b 100644 (file)
@@ -133,11 +133,11 @@ 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:
       raise
-  except WindowsError:  # pylint: disable=E0602
-    pass
 
 
 def safe_unlink(path):