summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/utils.py
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2011-01-10 23:05:19 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-01-12 13:47:14 +0000
commit2ef204dcdd28d60819ad7a413426b9676c54a3a4 (patch)
tree64cefc01e17bedaea8501555277c9d4032e3ad6f /bitbake/lib/bb/utils.py
parentc405a3a13eb961365adb788e710fa26513605543 (diff)
downloadpoky-2ef204dcdd28d60819ad7a413426b9676c54a3a4.tar.gz
*: use utils.remove() some more
(Bitbake rev: d3489b141cac1197324661680fe38b8a88bc49b4) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/utils.py')
-rw-r--r--bitbake/lib/bb/utils.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py
index 5b3710f84f..40b5f2f3dc 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -582,10 +582,12 @@ def build_environment(d):
582 582
583def remove(path, recurse=False): 583def remove(path, recurse=False):
584 """Equivalent to rm -f or rm -rf""" 584 """Equivalent to rm -f or rm -rf"""
585 if not path:
586 return
585 import os, errno, shutil 587 import os, errno, shutil
586 try: 588 try:
587 os.unlink(path) 589 os.unlink(path)
588 except OSError, exc: 590 except OSError as exc:
589 if recurse and exc.errno == errno.EISDIR: 591 if recurse and exc.errno == errno.EISDIR:
590 shutil.rmtree(path) 592 shutil.rmtree(path)
591 elif exc.errno != errno.ENOENT: 593 elif exc.errno != errno.ENOENT: