diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2015-05-03 08:56:19 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2015-05-03 08:56:19 +1200 |
commit | bf71a9a2a03697be4332f51727fa19fc4bcb4c62 (patch) | |
tree | b5706847d408445c2bf9fd3edd55c83edde1e493 /libpathod/language/base.py | |
parent | a46e17459d6afa9b9da1e29dd2831c760c8868da (diff) | |
download | mitmproxy-bf71a9a2a03697be4332f51727fa19fc4bcb4c62.tar.gz mitmproxy-bf71a9a2a03697be4332f51727fa19fc4bcb4c62.tar.bz2 mitmproxy-bf71a9a2a03697be4332f51727fa19fc4bcb4c62.zip |
base.PathodSpec -> http.PathodResponse
Diffstat (limited to 'libpathod/language/base.py')
-rw-r--r-- | libpathod/language/base.py | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/libpathod/language/base.py b/libpathod/language/base.py index 5b9e99f6..e2cd9c9e 100644 --- a/libpathod/language/base.py +++ b/libpathod/language/base.py @@ -259,39 +259,6 @@ class KeyValue(_Component): ) -class PathodSpec(Token): - def __init__(self, value): - self.value = value - try: - import http - self.parsed = http.Response( - http.Response.expr().parseString( - value.val, - parseAll=True - ) - ) - except pp.ParseException, v: - raise exceptions.ParseException(v.msg, v.line, v.col) - - @classmethod - def expr(klass): - e = pp.Literal("s").suppress() - e = e + ValueLiteral.expr() - return e.setParseAction(lambda x: klass(*x)) - - def values(self, settings): - return [ - self.value.get_generator(settings), - ] - - def spec(self): - return "s%s"%(self.value.spec()) - - def freeze(self, settings): - f = self.parsed.freeze(settings).spec() - return PathodSpec(ValueLiteral(f.encode("string_escape"))) - - class CaselessLiteral(_Component): """ A caseless token that can take only one value. |