summaryrefslogtreecommitdiffstats
path: root/layman
diff options
context:
space:
mode:
authorBrian Dolbec <brian.dolbec@gmail.com>2011-01-17 20:06:37 -0800
committerBrian Dolbec <brian.dolbec@gmail.com>2011-02-12 19:48:34 -0800
commit3da3a059d7e0c251e457a3b803752dd517acf726 (patch)
tree441f5c1556946c8724a07607b22990bd24248562 /layman
parent92298c7aa198f0492655d365fd8bb11f2d883869 (diff)
downloadlayman-3da3a059d7e0c251e457a3b803752dd517acf726.tar.gz
layman-3da3a059d7e0c251e457a3b803752dd517acf726.tar.bz2
layman-3da3a059d7e0c251e457a3b803752dd517acf726.zip
add missing output messages
Diffstat (limited to 'layman')
-rw-r--r--layman/cli.py23
1 files changed, 20 insertions, 3 deletions
diff --git a/layman/cli.py b/layman/cli.py
index b273c89..29b6989 100644
--- a/layman/cli.py
+++ b/layman/cli.py
@@ -79,7 +79,7 @@ class ListPrinter(object):
if supported:
# Is this an official overlay?
if official:
- self.output.info(summary, 1)
+ self.output.info(summary, 1)
# Unofficial overlays will only be listed if we are not
# checking or listing verbose
elif complain:
@@ -197,7 +197,16 @@ class Main(object):
if 'ALL' in selection:
selection = self.api.get_available()
self.output.debug('Adding selected overlays', 6)
- return self.api.add_repos(selection)
+ result = self.api.add_repos(selection)
+ if result:
+ self.output.info('Successfully added overlay(s) '+\
+ ', '.join(selection) +'.', 2)
+ else:
+ errors = self.api.get_errors()
+ self.output.warn('Failed to add overlay(s).\nError was: '
+ + str('\n'.join(errors)), 2)
+ return result
+
def Sync(self):
@@ -217,7 +226,15 @@ class Main(object):
if 'ALL' in selection:
selection = self.api.get_installed()
self.output.debug('Deleting selected overlays', 6)
- return self.api.delete_repos(selection)
+ result = self.api.delete_repos(selection)
+ if result:
+ self.output.info('Successfully deleted overlay(s) ' +\
+ ', '.join(selection) + '.', 2)
+ else:
+ errors = self.api.get_errors()
+ self.output.warn('Failed to delete overlay(s).\nError was: '
+ + str('\n'.join(errors)), 2)
+ return result
def Info(self):