pygobject r804 - in trunk: . gobject
- From: johan svn gnome org
- To: svn-commits-list gnome org
- Subject: pygobject r804 - in trunk: . gobject
- Date: Mon, 14 Jul 2008 21:53:31 +0000 (UTC)
Author: johan
Date: Mon Jul 14 21:53:31 2008
New Revision: 804
URL: http://svn.gnome.org/viewvc/pygobject?rev=804&view=rev
Log:
2008-07-14 Johan Dahlin <johan gnome org>
Bug 378704 â OptionParser.parse_args() returns unexpected results
* gobject/option.py:
Patch by Johannes HÃlzl
Modified:
trunk/ChangeLog
trunk/gobject/option.py
Modified: trunk/gobject/option.py
==============================================================================
--- trunk/gobject/option.py (original)
+++ trunk/gobject/option.py Mon Jul 14 21:53:31 2008
@@ -313,7 +313,11 @@
def _process_args(self, largs, rargs, values):
context = self._to_goptioncontext(values)
- largs.extend(context.parse([sys.argv[0]] + rargs))
+
+ # _process_args() returns the remaining parameters in rargs.
+ # The prepended program name is used to all g_set_prgname()
+ # The program name is cut away so it doesn't appear in the result.
+ rargs[:] = context.parse([sys.argv[0]] + rargs)[1:]
def parse_args(self, args=None, values=None):
old_args = args or []
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]