--- /usr/lib64/python2.7/site-packages/layman/cli.py 2013-05-15 02:40:31.662954765 +0400 +++ cli.py 2013-05-15 02:40:05.101954994 +0400 @@ -145,10 +145,12 @@ ('list_local', 'ListLocal'),] def __call__(self): + quietness = self.config.get_option("quiet") self.output.debug("CLI.__call__(): self.config.keys()" " %s" % str(self.config.keys()), 6) # blank newline -- no " *" - self.output.notice('') + if not quietness: + self.output.notice('') # Make fetching the overlay list a default action if not 'nofetch' in self.config.keys(): # Actions that implicitely call the fetch operation before @@ -199,7 +201,8 @@ " %s" % action) for _error in _errors: self.output.error(_error) - self.output.notice("") + if not quietness: + self.output.notice("") # Reset umask os.umask(old_umask) @@ -213,18 +216,21 @@ def Fetch(self): ''' Fetches the overlay listing. ''' + quietness = self.config.get_option("quiet") self.output.info("Fetching remote list,...", 2) result = self.api.fetch_remote_list() if result: self.output.info('Fetch Ok', 2) # blank newline -- no " *" - self.output.notice('') + if not quietness: + self.output.notice('') return result def Add(self): ''' Adds the selected overlays. ''' + quietness = self.config.get_option("quiet") self.output.info("Adding overlay,...", 2) selection = decode_selection(self.config['add']) if 'ALL' in selection: @@ -235,7 +241,8 @@ self.output.info('Successfully added overlay(s) '+\ ', '.join(selection) +'.', 2) # blank newline -- no " *" - self.output.notice('') + if not quietness: + self.output.notice('') return result @@ -243,6 +250,7 @@ def Sync(self): ''' Syncs the selected overlays. ''' + quietness = self.config.get_option("quiet") self.output.info("Syncing selected overlays,...", 2) # Note api.sync() defaults to printing results selection = decode_selection(self.config['sync']) @@ -251,13 +259,15 @@ self.output.debug('Updating selected overlays', 6) result = self.api.sync(selection, update_news=True) # blank newline -- no " *" - self.output.notice('') + if not quietness: + self.output.notice('') return result def Delete(self): ''' Deletes the selected overlays. ''' + quietness = self.config.get_option("quiet") self.output.info('Deleting selected overlays,...', 2) selection = decode_selection(self.config['delete']) if 'ALL' in selection: @@ -267,13 +277,15 @@ self.output.info('Successfully deleted overlay(s) ' +\ ', '.join(selection) + '.', 2) # blank newline -- no " *" - self.output.notice('') + if not quietness: + self.output.notice('') return result def Info(self): ''' Print information about the specified overlays. ''' + quietness = self.config.get_option("quiet") selection = decode_selection(self.config['info']) if 'ALL' in selection: selection = self.api.get_available() @@ -285,14 +297,15 @@ verbose=True, width=list_printer.width) list_printer.print_shortdict(info, complain=_complain) # blank newline -- no " *" - self.output.notice('') + if not quietness: + self.output.notice('') return info != {} def ListRemote(self): ''' Lists the available overlays. ''' - + quietness = self.config.get_option("quiet") self.output.debug('Printing remote overlays.', 6) list_printer = ListPrinter(self.config) @@ -301,7 +314,8 @@ verbose=self.config['verbose'], width=list_printer.width) list_printer.print_shortlist(info, complain=_complain) # blank newline -- no " *" - self.output.notice('') + if not quietness: + self.output.notice('') return info != {} @@ -310,6 +324,7 @@ ''' Lists the local overlays. ''' #print "ListLocal()" + quietness = self.config.get_option("quiet") self.output.debug('Printing installed overlays.', 6) list_printer = ListPrinter(self.config) @@ -326,7 +341,8 @@ #list_printer.print_fulldict(info, complain=_complain) # blank newline -- no " *" - self.output.notice('') + if not quietness: + self.output.notice('') return info != {}