diff options
author | Aarni Koskela <akx@iki.fi> | 2014-01-21 08:37:37 +0200 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2014-01-21 13:31:45 -0800 |
commit | 39809dab310b50d781f247ebbc89cf863fb545d3 (patch) | |
tree | 24b7844dc81d8e19b15f8a584564963868b40503 | |
parent | b0c689d7c86d9c3c421f4289c038c11464002dbb (diff) |
Try Py2.5 compatibility as last fallback for thread identity.
-rw-r--r-- | paramiko/win_pageant.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/paramiko/win_pageant.py b/paramiko/win_pageant.py index 1c0bc98c..2f6db4f9 100644 --- a/paramiko/win_pageant.py +++ b/paramiko/win_pageant.py @@ -40,10 +40,12 @@ win32con_WM_COPYDATA = 74 def get_thread_ident(): - try: # thread.get_ident() exists from Py2.5 to Py2.7. - return thread.get_ident() - except AttributeError: # threading.current_thread().ident exists from Py2.6 up to Py3.4. + # thread.get_ident() exists from Py2.5 to Py2.7. + # threading.current_thread().ident exists from Py2.6 up to Py3.4. + try: return threading.current_thread().ident + except AttributeError: + return thread.get_ident() def _get_pageant_window_object(): |