Bug 545070 - Use repr to display Python local variables
Summary: Use repr to display Python local variables
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: abrt
Version: 12
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jiri Moskovcak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-12-07 13:46 UTC by Tim Waugh
Modified: 2015-02-01 22:50 UTC (History)
9 users (show)

Fixed In Version: 1.0.4-1.fc12
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-01-26 01:06:48 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
abrt-repr.patch (532 bytes, patch)
2009-12-07 13:46 UTC, Tim Waugh
no flags Details | Diff

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.


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