From a0a89623f6ab41d78dcb8a9602387aca6657225a Mon Sep 17 00:00:00 2001 From: Johan Dahlin Date: Sat, 26 Jul 2008 10:46:49 +0000 Subject: Add a new API for registering exceptions for a GError domain. Register a 2008-07-26 Johan Dahlin * examples/gio/directory-async.py: * gio/Makefile.am: * gio/giomodule.c (init_gio): * glib/pyglib.c (pyglib_error_check), (pyglib_register_exception_for_domain): * glib/pyglib.h: * tests/test_gio.py: Add a new API for registering exceptions for a GError domain. Register a new exception for G_IO_ERROR, update tests and examples to use the new exception. svn path=/trunk/; revision=863 --- examples/gio/directory-async.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples') diff --git a/examples/gio/directory-async.py b/examples/gio/directory-async.py index 117adbc..d6599a0 100644 --- a/examples/gio/directory-async.py +++ b/examples/gio/directory-async.py @@ -1,6 +1,6 @@ import sys -import gobject +import glib import gio def next_files_done(enumerator, result): @@ -11,7 +11,7 @@ def next_files_done(enumerator, result): def enumerate_children_done(gfile, result): try: enumerator = gfile.enumerate_children_finish(result) - except gobject.GError, e: + except gio.Error, e: print 'ERROR:', e loop.quit() return @@ -26,5 +26,5 @@ gfile = gio.File(uri) gfile.enumerate_children_async( "standard::name", enumerate_children_done) -loop = gobject.MainLoop() +loop = glib.MainLoop() loop.run() -- cgit