summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/types.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oe/types.py')
-rw-r--r--meta/lib/oe/types.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/lib/oe/types.py b/meta/lib/oe/types.py
index 77ee7ee541..bbbabafbf6 100644
--- a/meta/lib/oe/types.py
+++ b/meta/lib/oe/types.py
@@ -154,7 +154,8 @@ def path(value, relativeto='', normalize='true', mustexist='false'):
if boolean(mustexist):
try:
- open(value, 'r')
+ with open(value, 'r'):
+ pass
except IOError as exc:
if exc.errno == errno.ENOENT:
raise ValueError("{0}: {1}".format(value, os.strerror(errno.ENOENT)))
@@ -183,4 +184,3 @@ def qemu_use_kvm(kvm, target_arch):
elif build_arch == target_arch:
use_kvm = True
return use_kvm
-