mirror of
https://github.com/zhigang1992/mitmproxy.git
synced 2026-05-13 09:57:23 +08:00
minor fixes
This commit is contained in:
@@ -188,9 +188,9 @@ def load(file_handle):
|
||||
|
||||
|
||||
def parse(data_type, data):
|
||||
# type: (int, bytes) -> TSerializable
|
||||
if six.PY2:
|
||||
data_type = ord(data_type)
|
||||
# type: (int, bytes) -> TSerializable
|
||||
if data_type == ord(b','):
|
||||
return data
|
||||
if data_type == ord(b';'):
|
||||
|
||||
@@ -4,6 +4,7 @@ This module handles the import of mitmproxy flows generated by old versions.
|
||||
from __future__ import absolute_import, print_function, division
|
||||
|
||||
import six
|
||||
from typing import Any # noqa
|
||||
|
||||
from netlib import version, strutils
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ from typing import Union # noqa
|
||||
|
||||
|
||||
def decode(obj, encoding, errors='strict'):
|
||||
# type: (Union[str, bytes], str) -> Union[str, bytes]
|
||||
# type: (Union[str, bytes], str, str) -> Union[str, bytes]
|
||||
"""
|
||||
Decode the given input object
|
||||
|
||||
@@ -36,7 +36,7 @@ def decode(obj, encoding, errors='strict'):
|
||||
|
||||
|
||||
def encode(obj, encoding, errors='strict'):
|
||||
# type: (Union[str, bytes], str) -> Union[str, bytes]
|
||||
# type: (Union[str, bytes], str, str) -> Union[str, bytes]
|
||||
"""
|
||||
Encode the given input object
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ setup(
|
||||
install_requires=[
|
||||
"click>=6.2, <7.0",
|
||||
"twine>=1.6.5, <1.7",
|
||||
"virtualenv>=14.0.5, <14.1",
|
||||
"virtualenv>=14.0.5, <15.1",
|
||||
"wheel>=0.29.0, <0.30",
|
||||
"six>=1.10.0, <1.11",
|
||||
"pysftp>=0.2.8, !=0.2.9, <0.3",
|
||||
|
||||
Reference in New Issue
Block a user