Improved Twisted version detection (wasn't working for Twisted 10.0.0)

This commit is contained in:
Pablo Hoffman 2010-08-26 20:32:26 -03:00
parent e95f7f63f9
commit 747f090f94
1 changed files with 2 additions and 1 deletions

View File

@ -41,7 +41,8 @@ def add_missing_blockingCallFromThread():
try:
import twisted
if twisted.__version__ < '8.0.0':
from twisted.python.versions import Version
if twisted.version < Version("twisted", 8, 0, 0):
add_missing_blockingCallFromThread()
except ImportError:
pass