Commit a1b917f6 authored by Jeremy Hylton's avatar Jeremy Hylton

Remove unused imports and local variables.

parent 687a32db
......@@ -12,13 +12,10 @@
##############################################################################
'''CGI Response Output formatter
$Id: BaseResponse.py,v 1.18 2003/11/18 13:17:17 tseaver Exp $'''
__version__ = '$Revision: 1.18 $'[11:-2]
$Id: BaseResponse.py,v 1.19 2003/12/26 23:48:18 jeremy Exp $'''
__version__ = '$Revision: 1.19 $'[11:-2]
import types, sys
from types import StringType, InstanceType
from zExceptions import Unauthorized, Forbidden
from zExceptions import NotFound, BadRequest
from zExceptions import Unauthorized, Forbidden, NotFound, BadRequest
class BaseResponse:
"""Base Response Class
......
......@@ -11,9 +11,9 @@
#
##############################################################################
__version__='$Revision: 1.95 $'[11:-2]
__version__='$Revision: 1.96 $'[11:-2]
import re, sys, os, urllib, time, random, cgi, codecs
import re, sys, os, time, random, codecs
from types import StringType, UnicodeType
from BaseRequest import BaseRequest
from HTTPResponse import HTTPResponse
......@@ -205,7 +205,6 @@ class HTTPRequest(BaseRequest):
If the URL makes no sense in light of the current virtual
hosting context, a ValueError is raised."""
other = self.other
bad_server_url = 0
path = filter(None, URL.split( '/'))
if URL.find( '://') >= 0:
......@@ -214,7 +213,6 @@ class HTTPRequest(BaseRequest):
# Check the path against BASEPATH1
vhbase = self._script
vhbl = len(vhbase)
bad_basepath = 0
if path[:vhbl] == vhbase:
path = path[vhbl:]
else:
......@@ -404,7 +402,7 @@ class HTTPRequest(BaseRequest):
CGI_name=isCGI_NAME
defaults={}
tainteddefaults={}
converter=seqf=None
converter=None
for item in fslist:
......@@ -453,10 +451,8 @@ class HTTPRequest(BaseRequest):
converter_type = type_name
flags=flags|CONVERTED
elif type_name == 'list':
seqf=list
flags=flags|SEQUENCE
elif type_name == 'tuple':
seqf=tuple
tuple_items[key]=1
flags=flags|SEQUENCE
elif (type_name == 'method' or type_name == 'action'):
......
......@@ -12,8 +12,8 @@
##############################################################################
'''CGI Response Output formatter
$Id: HTTPResponse.py,v 1.77 2003/11/18 13:17:17 tseaver Exp $'''
__version__ = '$Revision: 1.77 $'[11:-2]
$Id: HTTPResponse.py,v 1.78 2003/12/26 23:48:18 jeremy Exp $'''
__version__ = '$Revision: 1.78 $'[11:-2]
import types, os, sys, re
import zlib, struct
......@@ -288,7 +288,7 @@ class HTTPResponse(BaseResponse):
return self
if isinstance(body, tuple) and len(body) == 2:
title,body = body
title, body = body
if not isinstance(body, str):
if hasattr(body,'asHTML'):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment