Commit a1b917f6 authored by Jeremy Hylton's avatar Jeremy Hylton

Remove unused imports and local variables.

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