diff options
Diffstat (limited to 'meta/lib/oe')
-rw-r--r-- | meta/lib/oe/types.py | 4 |
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'): | |||
154 | 154 | ||
155 | if boolean(mustexist): | 155 | if boolean(mustexist): |
156 | try: | 156 | try: |
157 | open(value, 'r') | 157 | with open(value, 'r'): |
158 | pass | ||
158 | except IOError as exc: | 159 | except IOError as exc: |
159 | if exc.errno == errno.ENOENT: | 160 | if exc.errno == errno.ENOENT: |
160 | raise ValueError("{0}: {1}".format(value, os.strerror(errno.ENOENT))) | 161 | raise ValueError("{0}: {1}".format(value, os.strerror(errno.ENOENT))) |
@@ -183,4 +184,3 @@ def qemu_use_kvm(kvm, target_arch): | |||
183 | elif build_arch == target_arch: | 184 | elif build_arch == target_arch: |
184 | use_kvm = True | 185 | use_kvm = True |
185 | return use_kvm | 186 | return use_kvm |
186 | |||