Bug 245736 - yum tracebacks when failing to read y/n
Summary: yum tracebacks when failing to read y/n
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: 7
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-06-26 12:17 UTC by Florian Festi
Modified: 2014-01-21 22:58 UTC (History)
1 user (show)

Fixed In Version: 3.2.2-1.fc7
Clone Of:
Environment:
Last Closed: 2007-08-15 19:48:20 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Florian Festi 2007-06-26 12:17:04 UTC
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 22:31:25 UTC
Fixed in CVS

Comment 2 Fedora Update System 2007-07-23 15:46:55 UTC
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 13:59:43 UTC
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 15:26:07 UTC
Thanks, pushed

Comment 5 Fedora Update System 2007-08-15 19:47:53 UTC
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.