diff options
| author | Maximilian Hils <git@maximilianhils.com> | 2016-05-31 14:46:28 -0700 |
|---|---|---|
| committer | Maximilian Hils <git@maximilianhils.com> | 2016-05-31 14:46:28 -0700 |
| commit | 898602ad21978951c65aecff7d2e49c49ca10ce2 (patch) | |
| tree | 695ed783fefaad72fd0882e7ac7ab55105618e75 /pathod | |
| parent | 30fff1fb323d2de14557f9a6b2648e7af5e417a1 (diff) | |
| parent | 25e30f42be1f7823a3934907dd2113969303ed94 (diff) | |
| download | mitmproxy-898602ad21978951c65aecff7d2e49c49ca10ce2.tar.gz mitmproxy-898602ad21978951c65aecff7d2e49c49ca10ce2.tar.bz2 mitmproxy-898602ad21978951c65aecff7d2e49c49ca10ce2.zip | |
Merge pull request #1180 from dufferzafar/pathod-base
Python 3 - pathod.language.base
Diffstat (limited to 'pathod')
| -rw-r--r-- | pathod/language/__init__.py | 3 | ||||
| -rw-r--r-- | pathod/language/base.py | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/pathod/language/__init__.py b/pathod/language/__init__.py index 399baa3e..0841196e 100644 --- a/pathod/language/__init__.py +++ b/pathod/language/__init__.py @@ -3,6 +3,7 @@ from __future__ import absolute_import import itertools import time +from six.moves import range import pyparsing as pp from . import http, http2, websockets, writer, exceptions @@ -19,7 +20,7 @@ __all__ = [ def expand(msg): times = getattr(msg, "times", None) if times: - for j_ in xrange(int(times.value)): + for j_ in range(int(times.value)): yield msg.strike_token("times") else: yield msg diff --git a/pathod/language/base.py b/pathod/language/base.py index 97111ed6..1f4edb6f 100644 --- a/pathod/language/base.py +++ b/pathod/language/base.py @@ -3,6 +3,7 @@ import os import abc import pyparsing as pp +import six from six.moves import reduce from netlib.utils import escaped_str_to_bytes, bytes_to_escaped_str from netlib import human @@ -341,7 +342,7 @@ class OptionsOrValue(_Component): # it to be canonical. The user can specify a different case by using a # string value literal. self.option_used = False - if isinstance(value, basestring): + if isinstance(value, six.string_types): for i in self.options: # Find the exact option value in a case-insensitive way if i.lower() == value.lower(): |
