diff options
author | Maximilian Hils <git@maximilianhils.com> | 2016-03-20 22:50:03 +0100 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2016-03-20 22:50:03 +0100 |
commit | 2ce023a991d8edd52bb10186105a7725188cd8ac (patch) | |
tree | 69f3addbd34a8de58983636784651946029d0cf2 /pathod | |
parent | d8e8dfc1c6136c709bb3286c2f058a8ac101acc0 (diff) | |
download | mitmproxy-2ce023a991d8edd52bb10186105a7725188cd8ac.tar.gz mitmproxy-2ce023a991d8edd52bb10186105a7725188cd8ac.tar.bz2 mitmproxy-2ce023a991d8edd52bb10186105a7725188cd8ac.zip |
py3++
Diffstat (limited to 'pathod')
-rw-r--r-- | pathod/pathoc.py | 10 | ||||
-rw-r--r-- | pathod/test.py | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/pathod/pathoc.py b/pathod/pathoc.py index 64a81c94..86661f98 100644 --- a/pathod/pathoc.py +++ b/pathod/pathoc.py @@ -3,7 +3,7 @@ import sys import os import itertools import hashlib -import Queue +from six.moves import queue import random import select import time @@ -92,8 +92,8 @@ class WebsocketFrameReader(threading.Thread): self.showresp = showresp self.hexdump = hexdump self.rfile = rfile - self.terminate = Queue.Queue() - self.frames_queue = Queue.Queue() + self.terminate = queue.Queue() + self.frames_queue = queue.Queue() self.logger = log.ConnectionLogger( self.logfp, self.hexdump, @@ -119,7 +119,7 @@ class WebsocketFrameReader(threading.Thread): try: self.terminate.get_nowait() return - except Queue.Empty: + except queue.Empty: pass for rfile in r: with self.logger.ctx() as log: @@ -344,7 +344,7 @@ class Pathoc(tcp.TCPClient): timeout=timeout, block=True if timeout != 0 else False ) - except Queue.Empty: + except queue.Empty: if finish: continue else: diff --git a/pathod/test.py b/pathod/test.py index a2552376..23b7a5b6 100644 --- a/pathod/test.py +++ b/pathod/test.py @@ -1,6 +1,6 @@ from six.moves import cStringIO as StringIO import threading -import Queue +from six.moves import queue import requests import requests.packages.urllib3 @@ -13,7 +13,7 @@ class Daemon: IFACE = "127.0.0.1" def __init__(self, ssl=None, **daemonargs): - self.q = Queue.Queue() + self.q = queue.Queue() self.logfp = StringIO() daemonargs["logfp"] = self.logfp self.thread = _PaThread(self.IFACE, self.q, ssl, daemonargs) |