[Bugs] #1889 HIGH: Print stack when encountering an exception during log formatting

Sugar Labs Bugs bugtracker-noreply at sugarlabs.org
Sat May 15 08:45:49 EDT 2010


#1889: Print stack when encountering an exception during log formatting
-----------------------------+----------------------------------------------
    Reporter:  sascha_silbe  |          Owner:  sascha_silbe     
        Type:  enhancement   |         Status:  new              
    Priority:  High          |      Milestone:  0.88.x           
   Component:  sugar         |        Version:  Git as of bugdate
    Severity:  Blocker       |       Keywords:  r?               
Distribution:  Unspecified   |   Status_field:  Assigned         
-----------------------------+----------------------------------------------
Changes (by sascha_silbe):

 * cc: tomeu (added)
  * keywords:  r! => r?


Comment:

 Without patch:

 {{{
 Traceback (most recent call last):
   File "/usr/lib/python2.5/logging/__init__.py", line 744, in emit
     msg = self.format(record)
   File "/usr/lib/python2.5/logging/__init__.py", line 630, in format
     return fmt.format(record)
   File "/usr/lib/python2.5/logging/__init__.py", line 418, in format
     record.message = record.getMessage()
   File "/usr/lib/python2.5/logging/__init__.py", line 288, in getMessage
     msg = msg % self.args
 TypeError: int argument required
 }}}

 With patch:
 {{{
 Traceback (most recent call last):
   File "/usr/lib/python2.5/logging/__init__.py", line 744, in emit
     msg = self.format(record)
   File "/usr/lib/python2.5/logging/__init__.py", line 630, in format
     return fmt.format(record)
   File "/usr/lib/python2.5/logging/__init__.py", line 418, in format
     record.message = record.getMessage()
   File "/usr/lib/python2.5/logging/__init__.py", line 288, in getMessage
     msg = msg % self.args
 TypeError: int argument required
   File "/home/sascha.silbe/sugar-jhbuild/install/bin/sugar-session", line
 270, in <module>
     main()
   File "/home/sascha.silbe/sugar-jhbuild/install/bin/sugar-session", line
 260, in main
     gtk.main()
   File "/home/sascha.silbe/sugar-jhbuild/install/lib/python2.5/site-
 packages/jarabe/controlpanel/gui.py", line 321, in __select_option_cb
     self.show_section_view(option)
   File "/home/sascha.silbe/sugar-jhbuild/install/lib/python2.5/site-
 packages/jarabe/controlpanel/gui.py", line 218, in show_section_view
     self._options[option]['alerts'])
   File "/home/sascha.silbe/sugar-
 jhbuild/install/share/sugar/extensions/cpsection/aboutcomputer/view.py",
 line 55, in __init__
     logging.debug('foo %d', 'bar')
   File "/usr/lib/python2.5/logging/__init__.py", line 1327, in debug
     apply(root.debug, (msg,)+args, kwargs)
   File "/usr/lib/python2.5/logging/__init__.py", line 971, in debug
     apply(self._log, (DEBUG, msg, args), kwargs)
   File "/usr/lib/python2.5/logging/__init__.py", line 1101, in _log
     self.handle(record)
   File "/usr/lib/python2.5/logging/__init__.py", line 1111, in handle
     self.callHandlers(record)
   File "/usr/lib/python2.5/logging/__init__.py", line 1148, in
 callHandlers
     hdlr.handle(record)
   File "/usr/lib/python2.5/logging/__init__.py", line 655, in handle
     self.emit(record)
   File "/usr/lib/python2.5/logging/__init__.py", line 757, in emit
     self.handleError(record)
   File "/home/sascha.silbe/sugar-jhbuild/install/lib/python2.5/site-
 packages/sugar/logger.py", line 113, in handleError
     traceback.print_stack()
 }}}

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


More information about the Bugs mailing list