[pytango] 111/122: Fix python2 compatibility

Sandor Bodo-Merle sbodomerle-guest at moszumanska.debian.org
Thu Sep 28 19:18:24 UTC 2017


This is an automated email from the git hooks/post-receive script.

sbodomerle-guest pushed a commit to tag v9.2.1
in repository pytango.

commit 0d632c5b29dd0ff7452bfe2dacabc6d25d68f689
Author: Vincent Michel <vincent.michel at maxlab.lu.se>
Date:   Mon Jan 16 18:45:33 2017 +0100

    Fix python2 compatibility
---
 tango/server.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tango/server.py b/tango/server.py
index 1b7f0b1..98f8c0b 100644
--- a/tango/server.py
+++ b/tango/server.py
@@ -1616,7 +1616,11 @@ def _create_gevent_worker():
 
 def _create_asyncio_worker():
     import concurrent.futures
-    from threading import get_ident
+
+    try:
+        from threading import get_ident
+    except:
+        from threading import _get_ident as get_ident
 
     try:
         import asyncio

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pytango.git



More information about the debian-science-commits mailing list