Fix test_s3.py to work with python 2

This commit is contained in:
Adam Hellberg 2019-03-14 23:10:00 +01:00
parent 5fa3b097dc
commit af9ee9df53
No known key found for this signature in database
GPG key ID: CFC01CAD18FBA436

View file

@ -18,7 +18,13 @@ from twisted.python.failure import Failure
from twisted.test.proto_helpers import MemoryReactorClock from twisted.test.proto_helpers import MemoryReactorClock
from twisted.trial import unittest from twisted.trial import unittest
from queue import Queue import sys
is_py2 = sys.version[0] == '2'
if is_py2:
from Queue import Queue
else:
from queue import Queue
from threading import Event, Thread from threading import Event, Thread
from mock import Mock from mock import Mock