diff options
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: |