diff options
author | Johan Dahlin <johan@gnome.org> | 2008-07-20 12:48:13 +0000 |
---|---|---|
committer | Johan Dahlin <johan@src.gnome.org> | 2008-07-20 12:48:13 +0000 |
commit | 9cd866c9066eaa933b54e77225ada672fcfacad3 (patch) | |
tree | 25486f48cf8a267bdef8320e20d0385e41dbb1ac /gobject/option.py | |
parent | 723d35fc2d1f65e3d040c3b61ada66d45b84a481 (diff) | |
download | pygobject-9cd866c9066eaa933b54e77225ada672fcfacad3.tar.gz pygobject-9cd866c9066eaa933b54e77225ada672fcfacad3.tar.xz pygobject-9cd866c9066eaa933b54e77225ada672fcfacad3.zip |
Install the glib module, the helper library and the headers. Use it from
2008-07-20 Johan Dahlin <johan@gnome.org>
* glib/Makefile.am:
* gobject/Makefile.am:
* gobject/__init__.py:
* gobject/gobjectmodule.c (pyg_threads_init), (pyg_error_check),
(pyg_gerror_exception_check), (init_gobject):
* gobject/option.py:
Install the glib module, the helper library and the headers.
Use it from gobject and remove the old glib specific code from there.
svn path=/trunk/; revision=842
Diffstat (limited to 'gobject/option.py')
-rw-r--r-- | gobject/option.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gobject/option.py b/gobject/option.py index bab1be9..eee58d1 100644 --- a/gobject/option.py +++ b/gobject/option.py @@ -33,6 +33,9 @@ import sys import optparse from optparse import OptParseError, OptionError, OptionValueError, \ BadOptionError, OptionConflictError + +from glib import GError + import _gobject as gobject __all__ = [ @@ -182,7 +185,7 @@ class OptionGroup(optparse.OptionGroup): try: opt.process(option_name, option_value, self.values, parser) except OptionValueError, error: - gerror = gobject.GError(str(error)) + gerror = GError(str(error)) gerror.domain = gobject.OPTION_ERROR gerror.code = gobject.OPTION_ERROR_BAD_VALUE gerror.message = str(error) @@ -324,7 +327,7 @@ class OptionParser(optparse.OptionParser): try: options, args = optparse.OptionParser.parse_args( self, args, values) - except gobject.GError, error: + except GError, error: if error.domain != gobject.OPTION_ERROR: raise if error.code == gobject.OPTION_ERROR_BAD_VALUE: |