diff options
Diffstat (limited to 'meta/lib/oe')
-rw-r--r-- | meta/lib/oe/packagedata.py | 2 | ||||
-rw-r--r-- | meta/lib/oe/utils.py | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/meta/lib/oe/packagedata.py b/meta/lib/oe/packagedata.py index 62fd71898e..14c38bdc0f 100644 --- a/meta/lib/oe/packagedata.py +++ b/meta/lib/oe/packagedata.py | |||
@@ -12,7 +12,7 @@ def read_pkgdatafile(fn): | |||
12 | 12 | ||
13 | if os.access(fn, os.R_OK): | 13 | if os.access(fn, os.R_OK): |
14 | import re | 14 | import re |
15 | f = file(fn, 'r') | 15 | f = open(fn, 'r') |
16 | lines = f.readlines() | 16 | lines = f.readlines() |
17 | f.close() | 17 | f.close() |
18 | r = re.compile("([^:]+):\s*(.*)") | 18 | r = re.compile("([^:]+):\s*(.*)") |
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: | |||
7 | 7 | ||
8 | def read_file(filename): | 8 | def read_file(filename): |
9 | try: | 9 | try: |
10 | f = file( filename, "r" ) | 10 | f = open( filename, "r" ) |
11 | except IOError as reason: | 11 | except IOError as reason: |
12 | return "" # WARNING: can't raise an error now because of the new RDEPENDS handling. This is a bit ugly. :M: | 12 | return "" # WARNING: can't raise an error now because of the new RDEPENDS handling. This is a bit ugly. :M: |
13 | else: | 13 | else: |
14 | return f.read().strip() | 14 | data = f.read().strip() |
15 | f.close() | ||
16 | return data | ||
15 | return None | 17 | return None |
16 | 18 | ||
17 | def ifelse(condition, iftrue = True, iffalse = False): | 19 | def ifelse(condition, iftrue = True, iffalse = False): |