Bug 604030 - [abrt] report-0.15-1.el6: TextIO.py:72:queryChoice:EOFError
Summary: [abrt] report-0.15-1.el6: TextIO.py:72:queryChoice:EOFError
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: report   
(Show other bugs)
Version: 6.0
Hardware: x86_64 Linux
Target Milestone: rc
: ---
Assignee: Gavin Romig-Koch
QA Contact: David Kutálek
Whiteboard: abrt_hash:bf0dc1a0
Depends On:
TreeView+ depends on / blocked
Reported: 2010-06-15 08:39 UTC by David Kutálek
Modified: 2010-11-10 21:29 UTC (History)
2 users (show)

Fixed In Version: report-0.16-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-11-10 21:29:33 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
File: backtrace (1012 bytes, text/plain)
2010-06-15 08:40 UTC, David Kutálek
no flags Details

Description David Kutálek 2010-06-15 08:39:59 UTC
abrt version: 1.1.5
architecture: x86_64
cmdline: /usr/bin/python /usr/bin/report ./dummy-report.txt
component: report
executable: /usr/bin/report
kernel: 2.6.32-33.el6.x86_64
package: report-0.15-1.el6
reason: TextIO.py:72:queryChoice:EOFError
release: Red Hat Enterprise Linux release 6.0 Beta (Santiago)
time: 1276590821
uid: 501


Traceback (most recent call last):
  File "/usr/bin/report", line 139, in <module>
    app = report.report(signature, io, **optsDict)
  File "/usr/lib64/python2.6/site-packages/report/__init__.py", line 467, in report
    choice = buildChoices(signature, io, config, rptopts)
  File "/usr/lib64/python2.6/site-packages/report/__init__.py", line 442, in buildChoices
    choice = io.queryChoice(_("Where do you want to send this report:"), choices)
  File "/usr/lib64/python2.6/site-packages/report/io/TextIO.py", line 72, in queryChoice
    choice = raw_input("Choice: ")

Local variables in innermost frame:
count: 5
msg: 'Where do you want to send this report:'
self: <report.io.TextIO.TextIO instance at 0x193e6c8>
choices: [<report.io.ChoiceValue instance at 0x193e2d8>, <report.io.ChoiceValue instance at 0x1a700e0>, <report.io.ChoiceValue instance at 0x1a70128>, <report.io.ChoiceValue instance at 0x1ad5950>]
each: <report.io.ChoiceValue instance at 0x1ad5950>

There may be a situation when user wants to cancel reporting 
during choice of reporting destination. Report should handle 
Ctrl-D and Ctrl-C nicely and provide also a menuitem to cancel reporting.

How to reproduce
1. Run "report existing-report-file"
2. Hit Ctrl-D

Comment 1 David Kutálek 2010-06-15 08:40:07 UTC
Created attachment 424075 [details]
File: backtrace

Comment 3 RHEL Product and Program Management 2010-06-15 08:53:11 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for

Comment 4 David Kutálek 2010-06-15 11:58:55 UTC
Same EOFError appears also when Ctrl-D when asking for host.
I suppose it will be the same with other prompts, too.

[root@timothy plugins-basic]# report --path=/tmp --username=dkutalek --target=scp ./dummy-report.txt 

host: Traceback (most recent call last):
  File "/usr/bin/report", line 139, in <module>
    app = report.report(signature, io, **optsDict)
  File "/usr/lib64/python2.6/site-packages/report/__init__.py", line 471, in report
    retval = choice(signature, io)
  File "/usr/lib64/python2.6/site-packages/report/__init__.py", line 394, in <lambda>
    return (lambda module, optionsDict: lambda signature, io : module.report(signature, io, optionsDict))(module, optionsDict)
  File "/usr/lib64/python2.6/site-packages/report/plugins/scp/__init__.py", line 58, in report
    return copyFileToRemote(fileName, io, optionsDict)
  File "/usr/lib64/python2.6/site-packages/report/plugins/scp/__init__.py", line 90, in copyFileToRemote
    host = io.queryField("host")
  File "/usr/lib64/python2.6/site-packages/report/io/TextIO.py", line 61, in queryField
    fieldValue = raw_input("%s: " % fieldName)

Comment 5 Gavin Romig-Koch 2010-06-18 15:24:28 UTC
pushed to fedorahosted src repo.

CTRL-D is now noticed by the text input routines if it is the first character in the input field.  It aborts the input of that field, which also ends the program.

Also the 'target' input query for both the command line mode (text) and curses style mode (newt) now both include a specific 'cancel' option.  (The GUI (gtk) mode has had a cancel option for a while now.)

The report library specifically doesn't handle CTRL-C, so that it can be used/handled by the calling program.  The report command line already handles CTRL-C, and ends the program.

Comment 7 Gavin Romig-Koch 2010-06-21 20:24:42 UTC

Comment 10 releng-rhel@redhat.com 2010-11-10 21:29:33 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

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