summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage/cache/flat_hash.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/pym/portage/cache/flat_hash.py b/pym/portage/cache/flat_hash.py
index 983055a4b..49d7ce6a0 100644
--- a/pym/portage/cache/flat_hash.py
+++ b/pym/portage/cache/flat_hash.py
@@ -41,7 +41,10 @@ class database(fs_template.FsBased):
mode='r', encoding=_encodings['repo.content'],
errors='replace')
try:
- d = self._parse_data(myf.read().split("\n"), cpv)
+ lines = myf.read().split("\n")
+ if not lines[-1]:
+ lines.pop()
+ d = self._parse_data(lines, cpv)
if '_mtime_' not in d:
# Backward compatibility with old cache
# that uses mtime mangling.