Rev 5406: (jameinel) Check os.name for 'posix' to enable os.kill, in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Thu Sep 2 23:51:35 BST 2010


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 5406 [merge]
revision-id: pqm at pqm.ubuntu.com-20100902225129-83167cameln73xz2
parent: pqm at pqm.ubuntu.com-20100902212734-6q910gzpfezmk4do
parent: gzlist at googlemail.com-20100829185533-0jk70dk376caahm7
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2010-09-02 23:51:29 +0100
message:
  (jameinel) Check os.name for 'posix' to enable os.kill,
   since kill exists on win32 in python2.7 (Martin [gz])
modified:
  bzrlib/tests/__init__.py       selftest.py-20050531073622-8d0e3c8845c97a64
=== modified file 'bzrlib/tests/__init__.py'
--- a/bzrlib/tests/__init__.py	2010-08-30 07:42:12 +0000
+++ b/bzrlib/tests/__init__.py	2010-09-02 22:51:29 +0000
@@ -1944,15 +1944,15 @@
             variables. A value of None will unset the env variable.
             The values must be strings. The change will only occur in the
             child, so you don't need to fix the environment after running.
-        :param skip_if_plan_to_signal: raise TestSkipped when true and os.kill
-            is not available.
+        :param skip_if_plan_to_signal: raise TestSkipped when true and system
+            doesn't support signalling subprocesses.
         :param allow_plugins: If False (default) pass --no-plugins to bzr.
 
         :returns: Popen object for the started process.
         """
         if skip_if_plan_to_signal:
-            if not getattr(os, 'kill', None):
-                raise TestSkipped("os.kill not available.")
+            if os.name != "posix":
+                raise TestSkipped("Sending signals not supported")
 
         if env_changes is None:
             env_changes = {}




More information about the bazaar-commits mailing list