Permalink
Browse files
Fix Git.remove_ignored_files in release.py
- Loading branch information...
Showing
with
8 additions
and
1 deletion.
-
+8
−1
scripts/release.py
|
@@ -10,6 +10,7 @@ |
|
|
import os
|
|
|
import re
|
|
|
import sys
|
|
|
+import errno
|
|
|
import shutil
|
|
|
import logging
|
|
|
import textwrap
|
|
@@ -232,7 +233,13 @@ def remove_ignored_files(self): |
|
|
Removes all ignored files and directories.
|
|
|
"""
|
|
|
for path in self.get_ignored_files():
|
|
|
- shutil.rmtree()
|
|
|
+ try:
|
|
|
+ shutil.rmtree(path)
|
|
|
+ except OSError as error:
|
|
|
+ if error.errno == errno.ENOTDIR:
|
|
|
+ os.remove(path)
|
|
|
+ else:
|
|
|
+ raise
|
|
|
|
|
|
def tag(self, tag):
|
|
|
"""
|
|
|
0 comments on commit
aba3a1c