Bug 245736 - yum tracebacks when failing to read y/n
yum tracebacks when failing to read y/n
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
7
All Linux
low Severity low
: ---
: ---
Assigned To: Jeremy Katz
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-26 08:17 EDT by Florian Festi
Modified: 2014-01-21 17:58 EST (History)
1 user (show)

See Also:
Fixed In Version: 3.2.2-1.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-08-15 15:48:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Florian Festi 2007-06-26 08:17:04 EDT
Version-Release number of selected component (if applicable):
yum-3.2.0-1.fc7

When trying to feed parameters to yum via xargs without -y (which is admittedly
an user error) yum trace backs.

cat pkglists.txt | xargs yum install
  
Actual results:

Is this ok [y/N]: Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.main(sys.argv[1:])
  File "/usr/share/yum-cli/yummain.py", line 172, in main
    base.doTransaction()
  File "/usr/share/yum-cli/cli.py", line 296, in doTransaction
    if not self.userconfirm():
  File "/usr/share/yum-cli/output.py", line 115, in userconfirm
    choice = raw_input('Is this ok [y/N]: ')
EOFError: EOF when reading a line

Expected results:

Error message

Additional info:
Looks like there is some error handling code missing.
Comment 1 Jeremy Katz 2007-06-26 18:31:25 EDT
Fixed in CVS
Comment 2 Fedora Update System 2007-07-23 11:46:55 EDT
yum-3.2.2-1.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
Comment 3 Florian Festi 2007-07-24 09:59:43 EDT
Yeah, this problem was fixed! With this fix the program gets exactly one line
further:

Is this ok [y/N]: Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.main(sys.argv[1:])
  File "/usr/share/yum-cli/yummain.py", line 172, in main
    base.doTransaction()
  File "/usr/share/yum-cli/cli.py", line 299, in doTransaction
    if not self.userconfirm():
  File "/usr/share/yum-cli/output.py", line 126, in userconfirm
    choice = choice.lower()
AttributeError: 'list' object has no attribute 'lower'

Please change the line 125:
choice = []
to
choice = ''
Comment 4 Jeremy Katz 2007-07-24 11:26:07 EDT
Thanks, pushed
Comment 5 Fedora Update System 2007-08-15 15:47:53 EDT
yum-3.2.2-1.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.