From c79a8463f79cb042eacb8bc6fadc0db8b20f4c0f Mon Sep 17 00:00:00 2001 From: Gunnar Wrobel Date: Thu, 8 Nov 2007 19:18:01 +0000 Subject: Fix Gentoo bug #198483 (http://bugs.gentoo.org/show_bug.cgi?id=198483). --- ChangeLog | 7 +++++++ layman/action.py | 19 ++++++++++++------- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3bd26b4..bb71380 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-11-08 Gunnar Wrobel + + * layman/action.py (Info.run): + + Catch non-existing overlay when calling --info + http://bugs.gentoo.org/show_bug.cgi?id=198483 + 2007-09-12 Gunnar Wrobel * layman/version.py: diff --git a/layman/action.py b/layman/action.py index 428c061..d05fb1c 100644 --- a/layman/action.py +++ b/layman/action.py @@ -291,13 +291,18 @@ class Info: for i in self.selection: overlay = self.rdb.select(i) - # Is the overlay supported? - OUT.info(overlay.__str__(), 1) - if not overlay.is_official(): - OUT.warn('*** This is no official gentoo overlay ***\n', 1) - if not overlay.is_supported(): - OUT.error('*** You are lacking the necessary tools to install t' - 'his overlay ***\n') + + if overlay: + # Is the overlay supported? + OUT.info(overlay.__str__(), 1) + if not overlay.is_official(): + OUT.warn('*** This is no official gentoo overlay ***\n', 1) + if not overlay.is_supported(): + OUT.error('*** You are lacking the necessary tools to install t' + 'his overlay ***\n') + else: + OUT.warn('Overlay "' + i + '" does not exist!', 2) + result = 1 return 0 -- cgit v1.2.3-1-g7c22