summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/utils.py')
-rw-r--r--bitbake/lib/bb/utils.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py
index 2e10fc24dd..1ecc44a01a 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -27,6 +27,10 @@ import bb
27import bb.msg 27import bb.msg
28import multiprocessing 28import multiprocessing
29import fcntl 29import fcntl
30import subprocess
31import glob
32import traceback
33import errno
30from commands import getstatusoutput 34from commands import getstatusoutput
31from contextlib import contextmanager 35from contextlib import contextmanager
32 36
@@ -276,7 +280,6 @@ def better_compile(text, file, realfile, mode = "exec"):
276def _print_exception(t, value, tb, realfile, text, context): 280def _print_exception(t, value, tb, realfile, text, context):
277 error = [] 281 error = []
278 try: 282 try:
279 import traceback
280 exception = traceback.format_exception_only(t, value) 283 exception = traceback.format_exception_only(t, value)
281 error.append('Error executing a python function in %s:\n' % realfile) 284 error.append('Error executing a python function in %s:\n' % realfile)
282 285
@@ -565,11 +568,9 @@ def remove(path, recurse=False):
565 if not path: 568 if not path:
566 return 569 return
567 if recurse: 570 if recurse:
568 import subprocess, glob
569 # shutil.rmtree(name) would be ideal but its too slow 571 # shutil.rmtree(name) would be ideal but its too slow
570 subprocess.call(['rm', '-rf'] + glob.glob(path)) 572 subprocess.call(['rm', '-rf'] + glob.glob(path))
571 return 573 return
572 import os, errno, glob
573 for name in glob.glob(path): 574 for name in glob.glob(path):
574 try: 575 try:
575 os.unlink(name) 576 os.unlink(name)