Permalink
Browse files

Fix Git.remove_ignored_files in release.py

  • Loading branch information...
DasIch committed Apr 5, 2013
1 parent 10c568f commit aba3a1cd5f2b4cafeda748fbbe40f532a6ffc8ec
Showing with 8 additions and 1 deletion.
  1. +8 −1 scripts/release.py
View
@@ -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

Please sign in to comment.