mirror of https://github.com/GNOME/gimp.git
Don't use Python 2.4 specific functions, nor deprecated sys module
2006-10-07 Manish Singh <yosh@gimp.org> * plug-ins/pygimp/gimpfu.py: Don't use Python 2.4 specific functions, nor deprecated sys module attributes. Fixes bug #360411.
This commit is contained in:
parent
ba76b9ccee
commit
a8855ae632
|
@ -1,3 +1,8 @@
|
|||
2006-10-07 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* plug-ins/pygimp/gimpfu.py: Don't use Python 2.4 specific functions,
|
||||
nor deprecated sys module attributes. Fixes bug #360411.
|
||||
|
||||
2006-10-06 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/tools/gimpaligntool.c (gimp_align_tool_initialize): added
|
||||
|
|
|
@ -329,15 +329,21 @@ def _interact(proc_name, start_params):
|
|||
|
||||
def error_dialog(parent, proc_name):
|
||||
import sys, traceback
|
||||
|
||||
exc_str = exc_only_str = _('Missing exception information')
|
||||
|
||||
try:
|
||||
etype, value, tb = sys.exc_info()
|
||||
exc_str = ''.join(traceback.format_exception(etype, value, tb))
|
||||
exc_only_str = ''.join(traceback.format_exception_only(etype, value))
|
||||
finally:
|
||||
etype = value = tb = None
|
||||
|
||||
title = _("An error occured running %s") % proc_name
|
||||
dlg = gtk.MessageDialog(parent, gtk.DIALOG_DESTROY_WITH_PARENT,
|
||||
gtk.MESSAGE_ERROR, gtk.BUTTONS_CLOSE,
|
||||
title)
|
||||
dlg.format_secondary_text(
|
||||
"".join(
|
||||
traceback.format_exception_only(sys.exc_type, sys.exc_value)
|
||||
)
|
||||
)
|
||||
dlg.format_secondary_text(exc_only_str)
|
||||
|
||||
alignment = gtk.Alignment(0.0, 0.0, 1.0, 1.0)
|
||||
alignment.set_padding(0, 0, 12, 12)
|
||||
|
@ -356,7 +362,8 @@ def _interact(proc_name, start_params):
|
|||
expander.add(scrolled)
|
||||
scrolled.show()
|
||||
|
||||
label = gtk.Label(traceback.format_exc());
|
||||
|
||||
label = gtk.Label(exc_str)
|
||||
label.set_alignment(0.0, 0.0)
|
||||
label.set_padding(6, 6)
|
||||
label.set_selectable(True)
|
||||
|
|
Loading…
Reference in New Issue