Make a generic graphical error function
This commit is contained in:
parent
1f156248ee
commit
ad372bbdcd
|
@ -29,3 +29,13 @@ def dbg (log = ""):
|
|||
def err(log = ""):
|
||||
"""Print an error message"""
|
||||
print >> sys.stderr, log
|
||||
|
||||
def gerr(message = None):
|
||||
"""Display a graphical error. This should only be used for serious
|
||||
errors as it will halt execution"""
|
||||
|
||||
import gtk
|
||||
dialog = gtk.MessageDialog(None, gtk.DIALOG_MODAL,
|
||||
gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, message)
|
||||
dialog.run()
|
||||
|
||||
|
|
Loading…
Reference in New Issue