mirror of
https://github.com/zhigang1992/mitmproxy.git
synced 2026-01-12 22:48:54 +08:00
Py3: Import and Other misc. stuff
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
import itertools
|
||||
import time
|
||||
|
||||
@@ -5,8 +7,7 @@ import pyparsing as pp
|
||||
|
||||
from . import http, http2, websockets, writer, exceptions
|
||||
|
||||
from exceptions import *
|
||||
from base import Settings
|
||||
from .base import Settings
|
||||
assert Settings # prevent pyflakes from messing with this
|
||||
|
||||
|
||||
|
||||
@@ -3,9 +3,12 @@ import os
|
||||
import abc
|
||||
import pyparsing as pp
|
||||
|
||||
from six.moves import reduce
|
||||
|
||||
from .. import utils
|
||||
from . import generators, exceptions
|
||||
|
||||
|
||||
class Settings(object):
|
||||
|
||||
def __init__(
|
||||
@@ -105,7 +108,7 @@ class Token(object):
|
||||
class _TokValueLiteral(Token):
|
||||
|
||||
def __init__(self, val):
|
||||
self.val = val.decode("string_escape")
|
||||
self.val = val
|
||||
|
||||
def get_generator(self, settings_):
|
||||
return self.val
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import datetime
|
||||
|
||||
import six
|
||||
|
||||
import netlib.utils
|
||||
import netlib.tcp
|
||||
import netlib.http
|
||||
@@ -53,7 +55,7 @@ class LogCtx(object):
|
||||
]
|
||||
)
|
||||
if exc_value:
|
||||
raise exc_type, exc_value, traceback
|
||||
six.reraise(exc_type, exc_value, traceback)
|
||||
|
||||
def suppress(self):
|
||||
self.suppressed = True
|
||||
|
||||
@@ -13,14 +13,12 @@ import threading
|
||||
import OpenSSL.crypto
|
||||
import six
|
||||
|
||||
from netlib import tcp, http, certutils, websockets, socks
|
||||
from netlib import tcp, certutils, websockets, socks
|
||||
from netlib.exceptions import HttpException, TcpDisconnect, TcpTimeout, TlsException, TcpException, \
|
||||
NetlibException
|
||||
from netlib.http import http1, http2
|
||||
|
||||
import language.http
|
||||
import language.websockets
|
||||
from . import utils, log
|
||||
from . import utils, log, language
|
||||
|
||||
import logging
|
||||
from netlib.tutils import treq
|
||||
|
||||
@@ -6,15 +6,11 @@ import sys
|
||||
import threading
|
||||
import urllib
|
||||
|
||||
from netlib import tcp, http, certutils, websockets
|
||||
from netlib import tcp, certutils, websockets
|
||||
from netlib.exceptions import HttpException, HttpReadDisconnect, TcpTimeout, TcpDisconnect, \
|
||||
TlsException
|
||||
|
||||
from . import version, app, language, utils, log, protocols
|
||||
import language.http
|
||||
import language.actions
|
||||
import language.exceptions
|
||||
import language.websockets
|
||||
|
||||
|
||||
DEFAULT_CERT_DOMAIN = "pathod.net"
|
||||
|
||||
Reference in New Issue
Block a user