aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2015-11-26 14:54:53 -0500
committerAnthony G. Basile <blueness@gentoo.org>2015-11-26 14:54:53 -0500
commita92714aacc5da7c5075f1012656426616612534a (patch)
tree152a7c6c368529c0d7b4df1e6ce62239ea03aef6
parentlint: minor code cleanups. (diff)
downloadgrss-a92714aacc5da7c5075f1012656426616612534a.tar.gz
grss-a92714aacc5da7c5075f1012656426616612534a.tar.bz2
grss-a92714aacc5da7c5075f1012656426616612534a.zip
grs/WorldConf.py: guard against <cat>/<pkg> with no ebuilds.v0.4
-rw-r--r--grs/WorldConf.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/grs/WorldConf.py b/grs/WorldConf.py
index 48b93af..83c2175 100644
--- a/grs/WorldConf.py
+++ b/grs/WorldConf.py
@@ -82,7 +82,11 @@ class WorldConf():
# Construct a list of canonical named files for uninstalled pkgs.
slot_atoms = []
for _cp in uninstalled:
- _cpv = portdb.cp_list(_cp)[0]
+ try:
+ _cpv = portdb.cp_list(_cp)[0]
+ except IndexError:
+ print('Package with no ebuilds: %s' % _cp)
+ continue
slotvar = portdb.aux_get(_cpv, ['SLOT'])[0]
try:
_match = re.search(r'(.+?)\/(.+)', slotvar)