From 2b0465dbb93dd4bf0d6db366db597c05e92121d8 Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Wed, 15 Jul 2015 22:04:25 +0200 Subject: use new netlib module names --- libpathod/language/http.py | 8 ++++---- libpathod/language/http2.py | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'libpathod/language') diff --git a/libpathod/language/http.py b/libpathod/language/http.py index 0c4d9419..380a5d64 100644 --- a/libpathod/language/http.py +++ b/libpathod/language/http.py @@ -4,7 +4,7 @@ import abc import pyparsing as pp import netlib.websockets -from netlib import http_status, http_uastrings +from netlib.http import status_codes, user_agents from . import base, exceptions, actions, message @@ -78,13 +78,13 @@ class ShortcutLocation(_HeaderMixin, base.Value): class ShortcutUserAgent(_HeaderMixin, base.OptionsOrValue): preamble = "u" - options = [i[1] for i in http_uastrings.UASTRINGS] + options = [i[1] for i in user_agents.UASTRINGS] key = base.TokValueLiteral("User-Agent") def values(self, settings): value = self.value.val if self.option_used: - value = http_uastrings.get_by_shortcut(value.lower())[2] + value = user_agents.get_by_shortcut(value.lower())[2] return self.format_header( self.key.get_generator(settings), @@ -175,7 +175,7 @@ class Response(_HTTPMessage): l.extend(self.reason.values(settings)) else: l.append( - http_status.RESPONSES.get( + status_codes.RESPONSES.get( code, "Unknown code" ) diff --git a/libpathod/language/http2.py b/libpathod/language/http2.py index 6dd93d5f..8aee9931 100644 --- a/libpathod/language/http2.py +++ b/libpathod/language/http2.py @@ -1,6 +1,6 @@ import pyparsing as pp -from netlib import http_status, http_uastrings +from netlib.http import user_agents from . import base, message """ @@ -116,13 +116,13 @@ class ShortcutLocation(_HeaderMixin, base.Value): class ShortcutUserAgent(_HeaderMixin, base.OptionsOrValue): preamble = "u" - options = [i[1] for i in http_uastrings.UASTRINGS] + options = [i[1] for i in user_agents.UASTRINGS] key = base.TokValueLiteral("user-agent") def values(self, settings): value = self.value.val if self.option_used: - value = http_uastrings.get_by_shortcut(value.lower())[2] + value = user_agents.get_by_shortcut(value.lower())[2] return ( self.key.get_generator(settings), -- cgit v1.2.3