Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2006-07-12 20:24:49 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2006-07-12 20:24:49 (GMT)
commit02c697d862feef046a4ee2407cc29010a65382c5 (patch)
treee4a9056ae30075ed6422d2df646399416968606e /shell
parent2bbedf988b39c5af35777954444ba54ceba13ecb (diff)
Reuse the spawn code
Diffstat (limited to 'shell')
-rw-r--r--shell/Process.py6
-rw-r--r--shell/Session.py7
2 files changed, 5 insertions, 8 deletions
diff --git a/shell/Process.py b/shell/Process.py
index ea5dd0c..09d93a7 100644
--- a/shell/Process.py
+++ b/shell/Process.py
@@ -11,7 +11,9 @@ class Process:
def get_name(self):
return self._command
- def start(self):
+ def start(self, standard_output=False):
args = self._command.split()
flags = gobject.SPAWN_SEARCH_PATH
- result = gobject.spawn_async(args, flags=flags)
+ result = gobject.spawn_async(args, flags=flags,
+ standard_output=standard_output)
+ self._stdout = result[2]
diff --git a/shell/Session.py b/shell/Session.py
index 2aeb044..845aaec 100644
--- a/shell/Session.py
+++ b/shell/Session.py
@@ -22,12 +22,7 @@ class DbusProcess(Process):
return 'Dbus'
def start(self):
- args = self._command.split()
- flags = gobject.SPAWN_SEARCH_PATH
- result = gobject.spawn_async(args, flags=flags, standard_output=True,
- standard_error=True)
- self._stdout = result[2]
-
+ Process.start(self, True)
dbus_file = os.fdopen(self._stdout)
addr = dbus_file.readline()
addr = addr.strip()