diff options
Diffstat (limited to 'meta/lib/oe/utils.py')
-rw-r--r-- | meta/lib/oe/utils.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py index ec8260d9bd..0a2092b24b 100644 --- a/meta/lib/oe/utils.py +++ b/meta/lib/oe/utils.py @@ -7,11 +7,13 @@ except ImportError: def read_file(filename): try: - f = file( filename, "r" ) + f = open( filename, "r" ) except IOError as reason: return "" # WARNING: can't raise an error now because of the new RDEPENDS handling. This is a bit ugly. :M: else: - return f.read().strip() + data = f.read().strip() + f.close() + return data return None def ifelse(condition, iftrue = True, iffalse = False): |