diff --git a/wicd/networking.py b/wicd/networking.py index 26c71bc..25ece03 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 @@ -269,7 +268,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, @@ -477,7 +476,7 @@ class ConnectThread(threading.Thread): try: if self._should_die: self.connect_aborted('aborted') - thread.exit() + raise SystemExit finally: self.lock.release()