Revision: c5b058210581
Branch:   default
Author:   Mika Hänninen <[email protected]>
Date:     Thu May 16 04:24:07 2013
Log: process: Catch WindowsError that may happen when process is already dead
http://code.google.com/p/robotframework/source/detail?r=c5b058210581

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

=======================================
--- /src/robot/libraries/Process.py     Thu May 16 04:13:42 2013
+++ /src/robot/libraries/Process.py     Thu May 16 04:24:07 2013
@@ -335,10 +335,14 @@
         if not hasattr(process,'kill'):
             self._terminate_process(process)
             return
-        if kill:
-            process.kill()
-        else:
-            process.terminate()
+        try:
+            if kill:
+                process.kill()
+            else:
+                process.terminate()
+        except OSError:
+            if process.poll() is None:
+                raise

     def _terminate_process(self, theprocess):
         if sys.platform == 'win32':

--

--- 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