diff options
| author | Barry Warsaw <barry@python.org> | 2011-12-13 17:22:22 -0500 |
|---|---|---|
| committer | Barry Warsaw <barry@python.org> | 2011-12-13 17:22:22 -0500 |
| commit | e033b0c8f22a67abfe2ba1b61365d0c2570b7429 (patch) | |
| tree | d2389b609482c2f0f49b211613e5b83d607dffb9 /dbus/connection.py | |
| parent | 061e55e8edbfb457bf56194c52e7d7624855cf41 (diff) | |
| download | dbus-python-e033b0c8f22a67abfe2ba1b61365d0c2570b7429.tar.gz | |
Import threading instead of thread. The latter is gone in Python 3.
Diffstat (limited to 'dbus/connection.py')
| -rw-r--r-- | dbus/connection.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/dbus/connection.py b/dbus/connection.py index 10f03c7..89e9a2c 100644 --- a/dbus/connection.py +++ b/dbus/connection.py @@ -24,10 +24,7 @@ __all__ = ('Connection', 'SignalMatch') __docformat__ = 'reStructuredText' import logging -try: - import thread -except ImportError: - import dummy_thread as thread +import threading import weakref from _dbus_bindings import Connection as _Connection, \ @@ -252,7 +249,7 @@ class Connection(_Connection): """Map from object path to dict mapping dbus_interface to dict mapping member to list of SignalMatch objects.""" - self._signals_lock = thread.allocate_lock() + self._signals_lock = threading.Lock() """Lock used to protect signal data structures""" self.add_message_filter(self.__class__._signal_func) |
