diff options
author | Benjamin Peterson <benjamin@python.org> | 2009-10-09 22:15:50 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2009-10-09 22:15:50 (GMT) |
commit | 6e3dbbdf39f3b4eb6f18c0165e446df17218b7dc (patch) | |
tree | 09bb1d277d25af8ed32f042ff8fce5549105bc76 /Lib/wsgiref/handlers.py | |
parent | de0559998fef231efc9ecbdef5b3a195d4eaa28d (diff) | |
download | cpython-6e3dbbdf39f3b4eb6f18c0165e446df17218b7dc.zip cpython-6e3dbbdf39f3b4eb6f18c0165e446df17218b7dc.tar.gz cpython-6e3dbbdf39f3b4eb6f18c0165e446df17218b7dc.tar.bz2 |
replace has_key with 'in' operator
Diffstat (limited to 'Lib/wsgiref/handlers.py')
-rw-r--r-- | Lib/wsgiref/handlers.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/wsgiref/handlers.py b/Lib/wsgiref/handlers.py index 173e34c..0af1c8f 100644 --- a/Lib/wsgiref/handlers.py +++ b/Lib/wsgiref/handlers.py @@ -160,7 +160,7 @@ class BaseHandler: Subclasses can extend this to add other defaults. """ - if not self.headers.has_key('Content-Length'): + if 'Content-Length' not in self.headers: self.set_content_length() def start_response(self, status, headers,exc_info=None): @@ -195,11 +195,11 @@ class BaseHandler: if self.origin_server: if self.client_is_modern(): self._write('HTTP/%s %s\r\n' % (self.http_version,self.status)) - if not self.headers.has_key('Date'): + if 'Date' not in self.headers: self._write( 'Date: %s\r\n' % format_date_time(time.time()) ) - if self.server_software and not self.headers.has_key('Server'): + if self.server_software and 'Server' not in self.headers: self._write('Server: %s\r\n' % self.server_software) else: self._write('Status: %s\r\n' % self.status) |