From e236d7746a3780c4d14e57e1c1e6661bb7a3ef21 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Sat, 23 Jun 2012 18:34:35 +1200 Subject: Move http.py to netlib.http_status --- libpathod/rparse.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libpathod/rparse.py') diff --git a/libpathod/rparse.py b/libpathod/rparse.py index 47084520..92d0a54b 100644 --- a/libpathod/rparse.py +++ b/libpathod/rparse.py @@ -1,6 +1,6 @@ import operator, string, random, mmap, os, time import contrib.pyparsing as pp -import http +from netlib import http_status TESTING = False @@ -315,7 +315,7 @@ class Code: def __init__(self, code, msg=None): self.code, self.msg = code, msg if msg is None: - self.msg = ValueLiteral(http.RESPONSES.get(self.code, "Unknown code")) + self.msg = ValueLiteral(http_status.RESPONSES.get(self.code, "Unknown code")) def mod_response(self, settings, r): r.code = self.code @@ -342,7 +342,7 @@ class Response: ) version = "HTTP/1.1" code = 200 - msg = LiteralGenerator(http.RESPONSES[code]) + msg = LiteralGenerator(http_status.RESPONSES[code]) body = LiteralGenerator("") def __init__(self): self.headers = [] @@ -481,7 +481,7 @@ class InternalResponse(Response): def __init__(self, code, body): Response.__init__(self) self.code = code - self.msg = LiteralGenerator(http.RESPONSES.get(code, "Unknown error")) + self.msg = LiteralGenerator(http_status.RESPONSES.get(code, "Unknown error")) self.body = LiteralGenerator(body) self.headers = [ ( -- cgit v1.2.3