Revision: 9fb6e01430c6
Branch:   default
Author:   Mika Hänninen <[email protected]>
Date:     Thu Apr 18 23:53:35 2013
Log: using connectioncache.get_connection instead switch in couple methods
http://code.google.com/p/robotframework/source/detail?r=9fb6e01430c6

Modified:
 /src/robot/libraries/ProcessLibrary.py

=======================================
--- /src/robot/libraries/ProcessLibrary.py      Thu Apr 18 03:19:54 2013
+++ /src/robot/libraries/ProcessLibrary.py      Thu Apr 18 23:53:35 2013
@@ -54,9 +54,10 @@
         return index

     def process_is_alive(self, handle=None):
+        process = self._started_processes.current
         if handle:
-            self._started_processes.switch(handle)
-        return self._started_processes.current.poll() is None
+            process,_ = self._started_processes.get_connection(handle)
+        return process.poll() is None

     def process_should_be_alive(self, handle=None):
         if not self.process_is_alive(handle):
@@ -67,9 +68,10 @@
             raise AssertionError('Process is alive')

     def wait_for_process(self, handle=None):
+        process = self._started_processes.current
         if handle:
-            self._started_processes.switch(handle)
-        exit_code = self._started_processes.current.wait()
+            process,_ = self._started_processes.get_connection(handle)
+        exit_code = process.wait()
         logs = self._logs[handle]
         return ExecutionResult(logs.stdout, logs.stderr, exit_code)

--

--- You received this message because you are subscribed to the Google Groups "robotframework-commit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to