Bug 545070

Summary: Use repr to display Python local variables
Product: [Fedora] Fedora Reporter: Tim Waugh <twaugh>
Component: abrtAssignee: Jiri Moskovcak <jmoskovc>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: anton, dfediuck, dvlasenk, dwmw2, iprikryl, jmoskovc, kklic, mnowak, npajkovs
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 1.0.4-1.fc12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-01-26 01:06:48 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:
Attachments:
Description Flags
abrt-repr.patch none

Description Tim Waugh 2009-12-07 13:46:46 UTC
Created attachment 376683 [details]
abrt-repr.patch

Description of problem:
It's great that abrt shows the Python local variables in a traceback, but it would be even more useful if it used repr() instead of str() to display them.

For example in bug #544865 it is impossible to determine the type of fax_number, whereas repr would tell me if it was a string, a unicode type, an integer, or whatever.

Version-Release number of selected component (if applicable):
abrt-1.0.0-1.fc12.x86_64

Untested patch attached.

Comment 1 Jiri Moskovcak 2009-12-07 15:13:22 UTC
Fixed in git.

Thanks for the patch,
Jirka

Comment 2 Fedora Update System 2009-12-08 18:50:14 UTC
abrt-1.0.1-1.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/abrt-1.0.1-1.fc12

Comment 3 Fedora Update System 2009-12-10 04:22:05 UTC
abrt-1.0.1-1.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update abrt'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2009-12994

Comment 4 Tim Waugh 2010-01-15 11:37:27 UTC
I'm still getting reports where repr() is not being used.  For example bug #555552, from abrt 1.0.3:

Local variables in innermost frame:
self: <monitor.Monitor instance at 0x7faf7000b4d0>
printer: HP1020-ADM033

Here's what I expect:

Local variables in innermost frame:
self: <monitor.Monitor instance at 0x7faf7000b4d0>
printer: 'HP1020-ADM033'

(i.e. quotes around the printer string to show that it's an ASCII string).

Otherwise if it says None there is no way to tell the difference between the nul value and the string "None".

Comment 5 Jiri Moskovcak 2010-01-15 14:22:47 UTC
Yes, you're right, there was one place missing repr() fixed in git.

Comment 6 Fedora Update System 2010-01-22 15:30:00 UTC
abrt-1.0.4-1.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/abrt-1.0.4-1.fc12

Comment 7 Fedora Update System 2010-01-26 01:06:31 UTC
abrt-1.0.4-1.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.