diff options
author | Stephen Finucane <stephenfin@redhat.com> | 2022-02-17 11:37:13 +0000 |
---|---|---|
committer | Stephen Finucane <stephenfin@redhat.com> | 2022-03-21 18:31:10 +0000 |
commit | fa137a5bf1f2a86cc15ebc4d973f245e1543105d (patch) | |
tree | 1aa5f0d23479ead227f319d2751df2372215a6ce /swiftclient/multithreading.py | |
parent | 4983b909831b72b5361aadf573cadd3afaaf8976 (diff) | |
download | python-swiftclient-fa137a5bf1f2a86cc15ebc4d973f245e1543105d.tar.gz |
Remove six
This mostly affects tests. Nothing too complicated
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: Iabc78f651e1d48db35638280722f8019798eccd6
Diffstat (limited to 'swiftclient/multithreading.py')
-rw-r--r-- | swiftclient/multithreading.py | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/swiftclient/multithreading.py b/swiftclient/multithreading.py index 665ba63..cf72360 100644 --- a/swiftclient/multithreading.py +++ b/swiftclient/multithreading.py @@ -13,11 +13,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -import six import sys from concurrent.futures import ThreadPoolExecutor -from six.moves.queue import PriorityQueue +from queue import PriorityQueue class OutputManager(object): @@ -70,12 +69,8 @@ class OutputManager(object): self.print_pool.submit(self._write, data, self.print_stream) def _write(self, data, stream): - if six.PY3: - stream.buffer.write(data) - stream.flush() - if six.PY2: - stream.write(data) - stream.flush() + stream.buffer.write(data) + stream.flush() def print_msg(self, msg, *fmt_args): if fmt_args: @@ -100,8 +95,6 @@ class OutputManager(object): def _print(self, item, stream=None): if stream is None: stream = self.print_stream - if six.PY2 and isinstance(item, six.text_type): - item = item.encode('utf8') print(item, file=stream) def _print_error(self, item, count=1): |