#4454 HIGH Update.: Activity will not close if the write_file method raises an exception
Zarro Boogs per Child
bugtracker at laptop.org
Mon Nov 12 04:52:19 EST 2007
#4454: Activity will not close if the write_file method raises an exception
---------------------+------------------------------------------------------
Reporter: pascal | Owner: rwh
Type: defect | Status: new
Priority: high | Milestone: Update.1
Component: sugar | Version:
Resolution: | Keywords: review+
Verified: 0 |
---------------------+------------------------------------------------------
Changes (by marco):
* keywords: review? => review+
Comment:
{{{
+ try:
+ if not skip_save:
+ self.save()
+ except:
+ self._display_keep_failed_dialog()
+ return
}}}
Please print the trace with logging.info() in the except block. That will
help debugging a lot.
Style nitpicks:
{{{
+ alert = Alert()
+ alert.props.title = _('Keep error')
+ alert.props.msg = _('Keep error: all changes will be lost')
}}}
Please pass these properties in the constructor. title=... , msg=...
{{{
+ alert = Alert()
+ alert.props.title = _('Keep error')
+ alert.props.msg = _('Keep error: all changes will be lost')
+ cancel_icon = Icon(icon_name='dialog-cancel')
+ alert.add_button(gtk.RESPONSE_CANCEL, _('Don\'t stop'),
cancel_icon)
+ stop_icon = Icon(icon_name='dialog-ok')
+ alert.add_button(gtk.RESPONSE_OK, _('Stop anyway'), stop_icon)
+ self.add_alert(alert)
}}}
Use some more \n to separate blocks. For example:
{{{
+ alert = Alert()
+ alert.props.title = _('Keep error')
+ alert.props.msg = _('Keep error: all changes will be lost')
+ cancel_icon = Icon(icon_name='dialog-cancel')
+ alert.add_button(gtk.RESPONSE_CANCEL, _('Don\'t stop'),
cancel_icon)
+ stop_icon = Icon(icon_name='dialog-ok')
+ alert.add_button(gtk.RESPONSE_OK, _('Stop anyway'), stop_icon)
+ self.add_alert(alert)
}}}
Approved with these changes.
--
Ticket URL: <http://dev.laptop.org/ticket/4454#comment:15>
One Laptop Per Child <http://dev.laptop.org>
OLPC bug tracking system
More information about the Bugs
mailing list