summaryrefslogtreecommitdiffstats
path: root/pym/portage/xpak.py
diff options
context:
space:
mode:
Diffstat (limited to 'pym/portage/xpak.py')
-rw-r--r--pym/portage/xpak.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pym/portage/xpak.py b/pym/portage/xpak.py
index 01cfe7b0a..a05a86009 100644
--- a/pym/portage/xpak.py
+++ b/pym/portage/xpak.py
@@ -99,7 +99,8 @@ def xpak(rootdir,outfile=None):
# CONTENTS is generated during the merge process.
continue
x = _unicode_encode(x, encoding=_encodings['fs'], errors='strict')
- mydata[x] = open(os.path.join(rootdir, x), 'rb').read()
+ with open(os.path.join(rootdir, x), 'rb') as f:
+ mydata[x] = f.read()
xpak_segment = xpak_mem(mydata)
if outfile: