Ignore:
Timestamp:
Feb 3, 2015, 8:28:05 AM (11 years ago)
Author:
Yuri Dario
Message:

yum: initial vendor import of yum 3.4.3.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • yum/vendor/current/shell.py

    r2 r514  
     1#! /usr/bin/python -tt
    12# This program is free software; you can redistribute it and/or modify
    23# it under the terms of the GNU General Public License as published by
     
    5152        self.verbose_logger = logging.getLogger("yum.verbose.cli")
    5253
     54        # NOTE: This is shared with self.base ... so don't reassign.
     55        self._shell_history_cmds = []
     56
     57    def _shell_history_add_cmds(self, cmds):
     58        if not self.base.conf.history_record:
     59            return
     60
     61        self._shell_history_cmds.append(cmds)
    5362
    5463    def _shlex_split(self, input_string):
     
    98107            self.base.cmds = self._shlex_split(self.base.cmdstring)
    99108            self.base.plugins.run('args', args=self.base.cmds)
     109
     110            self._shell_history_add_cmds(self.base.cmds)
    100111
    101112            try:
     
    266277            cmds.insert(0, 'repolist')
    267278            self.base.cmds = cmds
     279
     280            self._shell_history_add_cmds(self.base.cmds)
    268281
    269282            try:
     
    343356                    self.logger.critical('\n\nExiting on Broken Pipe')
    344357            else:
    345                 if returnval not in [0,1]:
     358                if returnval not in [0,1,-1]:
    346359                    self.verbose_logger.info('Transaction encountered a serious error.')
    347360                else:
    348361                    if returnval == 1:
    349362                        self.verbose_logger.info('There were non-fatal errors in the transaction')
     363                    elif returnval == -1:
     364                        self.verbose_logger.info("Transaction didn't start")
    350365                    self.verbose_logger.log(logginglevels.INFO_2,
    351366                        'Finished Transaction')
Note: See TracChangeset for help on using the changeset viewer.