From 107c12268cca27eac00effdcf0b88cc4e08b7aec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20=C3=96zkural?= Date: Thu, 15 Dec 2005 01:01:43 +0000 Subject: [PATCH] * fix: remove: do not show safety switch msg when there is nothing to show --- pisi/operations.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pisi/operations.py b/pisi/operations.py index 9a033e81..d551bedf 100644 --- a/pisi/operations.py +++ b/pisi/operations.py @@ -415,9 +415,10 @@ def remove(A): if not ctx.get_option('bypass_safety'): if ctx.componentdb.has_component('system.base'): refused = A.intersection(set(ctx.componentdb.get_component('system.base').packages)) - ctx.ui.warning(_('Safety switch: cannot remove the following packages in system.base: ') + - util.strlist(refused)) - A = A - set(ctx.componentdb.get_component('system.base').packages) + if refused: + ctx.ui.warning(_('Safety switch: cannot remove the following packages in system.base: ') + + util.strlist(refused)) + A = A - set(ctx.componentdb.get_component('system.base').packages) else: ctx.ui.warning(_('Safety switch: the component system.base cannot be found'))