From edbfd1855326ed40da73d83d29dc4b960940cbd8 Mon Sep 17 00:00:00 2001 From: Dan O'Reilly Date: Sat, 28 Feb 2009 15:34:34 -0500 Subject: [PATCH] Don't use the thread module in networking.py. --- wicd/networking.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/wicd/networking.py b/wicd/networking.py index c308790..efb62c5 100644 --- a/wicd/networking.py +++ b/wicd/networking.py @@ -45,7 +45,6 @@ import re import time import threading import os -import thread from signal import SIGTERM # wicd imports @@ -267,7 +266,7 @@ class ConnectThread(threading.Thread): is_connecting = None should_die = False - lock = thread.allocate_lock() + lock = threading.Lock() def __init__(self, network, interface_name, before_script, after_script, disconnect_script, gdns1, gdns2, gdns3, gdns_dom, gsearch_dom, @@ -470,7 +469,7 @@ class ConnectThread(threading.Thread): try: if self._should_die: self.connect_aborted('aborted') - thread.exit() + raise SystemExit finally: self.lock.release()