[tor-commits] [stem/master] Inverted check when falling back to kill a process
atagar at torproject.org
atagar at torproject.org
Mon Jun 25 01:45:02 UTC 2012
commit 04a6225ffdccc81a431044d05f4f411c7e5a88f5
Author: Damian Johnson <atagar at torproject.org>
Date: Sat Jun 23 14:18:32 2012 -0700
Inverted check when falling back to kill a process
Oops, we're supposed to use os.kill() as a fallback if we *aren't* on windows.
---
stem/process.py | 4 ++--
test/integ/process.py | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/stem/process.py b/stem/process.py
index e9d453e..337699d 100644
--- a/stem/process.py
+++ b/stem/process.py
@@ -87,7 +87,7 @@ def launch_tor(tor_cmd = "tor", args = None, torrc_path = None, completion_perce
if stem.prereq.is_python_26():
tor_process.kill()
- elif stem.util.system.is_windows():
+ elif not stem.util.system.is_windows():
os.kill(tor_process.pid, signal.SIGTERM)
raise OSError("reached a %i second timeout without success" % timeout)
@@ -107,7 +107,7 @@ def launch_tor(tor_cmd = "tor", args = None, torrc_path = None, completion_perce
# ... but best make sure
if stem.prereq.is_python_26():
tor_process.kill()
- elif stem.util.system.is_windows():
+ elif not stem.util.system.is_windows():
os.kill(tor_process.pid, signal.SIGTERM)
raise OSError("Process terminated: %s" % last_problem)
diff --git a/test/integ/process.py b/test/integ/process.py
index 0573a1c..423b2c3 100644
--- a/test/integ/process.py
+++ b/test/integ/process.py
@@ -49,7 +49,7 @@ class TestProcess(unittest.TestCase):
if stem.prereq.is_python_26():
tor_process.kill()
- elif stem.util.system.is_windows():
+ elif not stem.util.system.is_windows():
os.kill(tor_process.pid, signal.SIGTERM)
def test_launch_tor_with_timeout(self):
More information about the tor-commits
mailing list