summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-10-25 16:49:59 +0000
committerZac Medico <zmedico@gentoo.org>2007-10-25 16:49:59 +0000
commite849abdb44fa7c4bdb56f6e16b71c0e41f460f80 (patch)
tree52ca3be6c2c2937b54feae44187df00eb4076f37
parentb5288fc2f13387aa7efc30402e931a5c7b922f4e (diff)
downloadportage-e849abdb44fa7c4bdb56f6e16b71c0e41f460f80.tar.gz
portage-e849abdb44fa7c4bdb56f6e16b71c0e41f460f80.tar.bz2
portage-e849abdb44fa7c4bdb56f6e16b71c0e41f460f80.zip
Handle a potential IndexError.
svn path=/main/trunk/; revision=8293
-rw-r--r--pym/portage/dbapi/vartree.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 18fc70096..209cebe4c 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -970,7 +970,9 @@ class dblink(object):
noiselevel=-1)
continue
mydat = line.split()
- correct_split_count = contents_split_counts.get(mydat[0])
+ correct_split_count = None
+ if mydat:
+ correct_split_count = contents_split_counts.get(mydat[0])
if correct_split_count and len(mydat) != correct_split_count:
if mydat[0] == "obj" and \
len(mydat) > contents_split_counts["obj"]: