[GRASS-SVN] r49168 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Nov 10 09:47:15 EST 2011


Author: martinl
Date: 2011-11-10 06:47:15 -0800 (Thu, 10 Nov 2011)
New Revision: 49168

Modified:
   grass/trunk/gui/wxpython/gui_modules/gcmd.py
Log:
wxGUI: simplify gcmd.Popen constructor


Modified: grass/trunk/gui/wxpython/gui_modules/gcmd.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/gcmd.py	2011-11-10 10:47:10 UTC (rev 49167)
+++ grass/trunk/gui/wxpython/gui_modules/gcmd.py	2011-11-10 14:47:15 UTC (rev 49168)
@@ -111,17 +111,11 @@
 
 class Popen(subprocess.Popen):
     """!Subclass subprocess.Popen"""
-    def __init__(self, *args, **kwargs):
+    def __init__(self, args, **kwargs):
         if subprocess.mswindows:
-            try:
-                kwargs['args'] = map(utils.EncodeString, kwargs['args'])
-            except KeyError:
-                if len(args) > 0:
-                    targs = list(args)
-                    targs[0] = map(utils.EncodeString, args[0])
-                    args = tuple(targs)
+            args = map(utils.EncodeString, args)
         
-        subprocess.Popen.__init__(self, *args, **kwargs)
+        subprocess.Popen.__init__(self, args, **kwargs)
         
     def recv(self, maxsize = None):
         return self._recv('stdout', maxsize)



More information about the grass-commit mailing list