Bug 245736

Summary: yum tracebacks when failing to read y/n
Product: [Fedora] Fedora Reporter: Florian Festi <ffesti>
Component: yumAssignee: Jeremy Katz <katzj>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 7CC: james.antill
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 3.2.2-1.fc7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-08-15 19:48:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.