[yum-commits] cli.py
James Antill
james at osuosl.org
Thu May 30 19:54:37 UTC 2013
cli.py | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
New commits:
commit 8f9373e186f6805c986f00b7bce060c8db9f7ee6
Author: James Antill <james at and.org>
Date: Thu May 30 15:06:22 2013 -0400
Fix removal of /d from prompt.
diff --git a/cli.py b/cli.py
index c6673de..ba98058 100755
--- a/cli.py
+++ b/cli.py
@@ -530,12 +530,19 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
occurred in the pre-transaction checks
"""
def _downloadonly_userconfirm(self):
+ # Note that we shouldn't just remove the 'd' option, or the options
+ # yum accepts will be different which is bad. So always accept it,
+ # but change the prompt.
+ dl_only = extra={'downloadonly' :
+ (u'd', _('d'), _('download'),
+ _('downloadonly'))}
if not stuff_to_download:
- return self.userconfirm()
+ ret = self.userconfirm(extra=dl_only)
+ if ret == 'downloadonly':
+ ret = None
+ return ret
return self.userconfirm(prompt=_('Is this ok [y/d/N]: '),
- extra={'downloadonly' :
- (u'd', _('d'), _('download'),
- _('downloadonly'))})
+ extra=dl_only)
# just make sure there's not, well, nothing to do
if len(self.tsInfo) == 0:
More information about the Yum-commits
mailing list