2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-12-26 11:05:51 +01:00

Issue 1278

This commit is contained in:
Thomas Nagy 2013-04-16 17:19:30 +02:00
parent 1c562a034a
commit 345f6bc99f
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
NEW IN WAF 1.7.11
-----------------
* Node.delete remove empty folders #1278
NEW IN WAF 1.7.10 NEW IN WAF 1.7.10
----------------- -----------------
* Enhancements in the LaTeX support #1248 * Enhancements in the LaTeX support #1248

View File

@ -185,7 +185,7 @@ class Node(object):
def delete(self): def delete(self):
"""Delete the file/folders, and remove this node from the tree. It becomes invalid after that""" """Delete the file/folders, and remove this node from the tree. It becomes invalid after that"""
try: try:
if getattr(self, 'children', None): if hasattr(self, 'children'):
shutil.rmtree(self.abspath()) shutil.rmtree(self.abspath())
else: else:
os.unlink(self.abspath()) os.unlink(self.abspath())