[Bugs] #1439 NORM: Report a problem control panel

Sugar Labs Bugs bugtracker-noreply at sugarlabs.org
Sun Jan 3 10:33:03 EST 2010


#1439: Report a problem control panel
----------------------------+-----------------------------------------------
    Reporter:  wadeb        |          Owner:  wadeb      
        Type:  enhancement  |         Status:  accepted   
    Priority:  Normal       |      Milestone:  0.88       
   Component:  sugar        |        Version:  Unspecified
    Severity:  Unspecified  |       Keywords:  r!         
Distribution:  Unspecified  |   Status_field:  Unconfirmed
----------------------------+-----------------------------------------------
Changes (by tomeu):

  * keywords:  r? => r!


Comment:

 logcollect.py uses a style different from the rest of Sugar, can you
 modify it according to
 http://wiki.sugarlabs.org/go/Development_Team/Code_guidelines ?

 {{{
 +def save_logs_to_journal(archive_name):
 }}}

 Should be private?

 {{{
 +    ds = datastore.create()
 }}}

 jobject is more common, grepping the sources helps to find consistent
 names

 {{{
 +    ds.metadata['title'] = archive_name
 +    ds.metadata['mime_type'] = 'application/zip'
 }}}

 I'm a bit concerned about users not being able to relate these entries to
 bug reports. Can we have a more descriptive title? And maybe the insect
 icon?

 {{{
 +    del ds
 }}}

 Not needed.

 {{{
 +    _logger.debug('Saving %s to the journal.' % archive_name)
 }}}

 Better avoid using % in debug messages because of performance.

 {{{
 +        _logger.debug('Failed to collect logs:\n%s\n', e)
 }}}

 Better use _logger.exception so we don't lose information about the
 exception

 {{{
 +        if server[:7] != 'http://':
 +            server = 'http://' + server + '/'
 }}}

 Won't be prepending http:// to an url that starts with https://?

 {{{
 +        # When the upload fails, fall back to saving the logs to the
 Journal.
 }}}

 Isn't this superfluous given the surrounding code?

 {{{
 +            _logger.debug('Failed to save logs to journal:\n%s\n', e)
 }}}

 Should be _logger.exception() instead?

 {{{
 +        description_label = gtk.Label(_('Please describe the problem you
 encountered.'))
 }}}

 Should this be about problems or could be more general?

-- 
Ticket URL: <http://bugs.sugarlabs.org/ticket/1439#comment:5>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system


More information about the Bugs mailing list