running lib2to3.fixes.fix_has_key
This commit is contained in:
@@ -1156,7 +1156,7 @@ class WSGIServer(Server):
|
||||
|
||||
Set multithreaded to False if your application is not MT-safe.
|
||||
"""
|
||||
if kw.has_key('handler'):
|
||||
if 'handler' in kw:
|
||||
del kw['handler'] # Doesn't make sense to let this through
|
||||
super(WSGIServer, self).__init__(**kw)
|
||||
|
||||
@@ -1284,9 +1284,9 @@ class WSGIServer(Server):
|
||||
|
||||
def _sanitizeEnv(self, environ):
|
||||
"""Ensure certain values are present, if required by WSGI."""
|
||||
if not environ.has_key('SCRIPT_NAME'):
|
||||
if 'SCRIPT_NAME' not in environ:
|
||||
environ['SCRIPT_NAME'] = ''
|
||||
if not environ.has_key('PATH_INFO'):
|
||||
if 'PATH_INFO' not in environ:
|
||||
environ['PATH_INFO'] = ''
|
||||
|
||||
# If any of these are missing, it probably signifies a broken
|
||||
@@ -1295,7 +1295,7 @@ class WSGIServer(Server):
|
||||
('SERVER_NAME', 'localhost'),
|
||||
('SERVER_PORT', '80'),
|
||||
('SERVER_PROTOCOL', 'HTTP/1.0')]:
|
||||
if not environ.has_key(name):
|
||||
if name not in environ:
|
||||
environ['wsgi.errors'].write('%s: missing FastCGI param %s '
|
||||
'required by WSGI!\n' %
|
||||
(self.__class__.__name__, name))
|
||||
|
||||
@@ -4,7 +4,7 @@ from gluon.html import XML
|
||||
def WIKI(text, encoding="utf8", safe_mode='escape', html4tags=False, **attributes):
|
||||
if not text:
|
||||
test = ''
|
||||
if attributes.has_key('extras'):
|
||||
if 'extras' in attributes:
|
||||
extras = attributes['extras']
|
||||
del attributes['extras']
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user