summaryrefslogtreecommitdiffstats
path: root/examples/gio
diff options
context:
space:
mode:
authorJohan Dahlin <johan@gnome.org>2008-07-26 10:46:49 +0000
committerJohan Dahlin <johan@src.gnome.org>2008-07-26 10:46:49 +0000
commita0a89623f6ab41d78dcb8a9602387aca6657225a (patch)
tree3b2793322e00e219bbd051d5a06dae1272eab99a /examples/gio
parent31c7971dcad9d8e02cb59fe603bc6d83bf035666 (diff)
downloadpygobject-a0a89623f6ab41d78dcb8a9602387aca6657225a.tar.gz
pygobject-a0a89623f6ab41d78dcb8a9602387aca6657225a.tar.xz
pygobject-a0a89623f6ab41d78dcb8a9602387aca6657225a.zip
Add a new API for registering exceptions for a GError domain. Register a
2008-07-26 Johan Dahlin <johan@gnome.org> * 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
Diffstat (limited to 'examples/gio')
-rw-r--r--examples/gio/directory-async.py6
1 files changed, 3 insertions, 3 deletions
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()