From 177dd2e75bb565ba1794bebb74a25ed527d9b4a4 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 23 Jan 2007 23:49:59 +0000 Subject: Fix broken line number counting for CONTENTS. svn path=/main/trunk/; revision=5765 --- pym/portage.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pym/portage.py') diff --git a/pym/portage.py b/pym/portage.py index eb44be8aa..98303857b 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -6801,8 +6801,9 @@ class dblink: myc.close() null_byte = "\0" contents_file = os.path.join(self.dbdir, "CONTENTS") - pos=1 + pos = 0 for line in mylines: + pos += 1 if null_byte in line: # Null bytes are a common indication of corruption. writemsg("!!! Null byte found in contents " + \ @@ -6847,7 +6848,6 @@ class dblink: return None except (KeyError,IndexError): print "portage: CONTENTS line",pos,"corrupt!" - pos += 1 self.contentscache=pkgfiles return pkgfiles -- cgit v1.2.3-1-g7c22