summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe
diff options
context:
space:
mode:
authorOla x Nilsson <ola.x.nilsson@axis.com>2019-10-21 12:30:29 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-10-23 16:26:14 +0100
commite3e86d6683e305865c9fd171c6081aec037d9870 (patch)
tree1cdfaaec0a0bef9f8b1ab2b573a3d6c84e4700e3 /meta/lib/oe
parent28b3635b7f40b627a9d6294a78589c78f0c682c8 (diff)
downloadopenembedded-core-contrib-e3e86d6683e305865c9fd171c6081aec037d9870.tar.gz
lib/oe/package_manager: Use with to control file handle lifetime
Signed-off-by: Ola x Nilsson <olani@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe')
-rw-r--r--meta/lib/oe/package_manager.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 7c373715adf..c841fdbf290 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -298,7 +298,7 @@ class DpkgIndexer(Indexer):
release.write("Label: %s\n" % arch)
cmd += "PSEUDO_UNLOAD=1 %s release . >> Release" % apt_ftparchive
-
+
index_cmds.append(cmd)
deb_dirs_found = True
@@ -655,7 +655,7 @@ def create_packages_dir(d, subrepo_dir, deploydir, taskname, filterbydependencie
pn = d.getVar("PN")
seendirs = set()
multilibs = {}
-
+
bb.utils.remove(subrepo_dir, recurse=True)
bb.utils.mkdirhier(subrepo_dir)
@@ -1006,8 +1006,8 @@ class RpmPM(PackageManager):
def load_old_install_solution(self):
if not os.path.exists(self.solution_manifest):
return []
-
- return open(self.solution_manifest, 'r').read().split()
+ with open(self.solution_manifest, 'r') as fd:
+ return fd.read().split()
def _script_num_prefix(self, path):
files = os.listdir(path)