[pygobject] Make sure that sys.argv is a list and not a sequence.
- From: Tomeu Vizoso <tomeuv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] Make sure that sys.argv is a list and not a sequence.
- Date: Wed, 23 Jun 2010 10:54:35 +0000 (UTC)
commit cc3ea77318ee572673d2a044deca9001366b0f08
Author: Tomeu Vizoso <tomeu vizoso collabora co uk>
Date: Wed Jun 23 12:26:51 2010 +0200
Make sure that sys.argv is a list and not a sequence.
Because Python's optparse will try to do things on it that can
only be done with list.
gi/overrides/Gtk.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gi/overrides/Gtk.py b/gi/overrides/Gtk.py
index 9f073c2..9e26d74 100644
--- a/gi/overrides/Gtk.py
+++ b/gi/overrides/Gtk.py
@@ -343,6 +343,6 @@ __all__.append('TextBuffer')
import sys
initialized, argv = Gtk.init_check(sys.argv)
-sys.argv = argv
+sys.argv = list(argv)
if not initialized:
raise RuntimeError("Gtk couldn't be initialized")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]