changeset 1167:038d975120bd

thfcgi: remove string module usage
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 13 Aug 2006 19:10:52 +0200
parents b6dee77f7e67
children 9754451de554
files MoinMoin/support/thfcgi.py
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/support/thfcgi.py	Sun Aug 13 19:10:43 2006 +0200
+++ b/MoinMoin/support/thfcgi.py	Sun Aug 13 19:10:52 2006 +0200
@@ -35,7 +35,6 @@
 import os
 import sys
 import select
-import string
 import socket
 import errno
 import cgi
@@ -557,13 +556,13 @@
         """Check if request is done from the right server."""
         # Apaches mod_fastcgi seems not to use FCGI_WEB_SERVER_ADDRS. 
         if os.environ.has_key('FCGI_WEB_SERVER_ADDRS'):
-            good_addrs = string.split(os.environ['FCGI_WEB_SERVER_ADDRS'], ',')
-            good_addrs = map(string.strip, good_addrs) # Remove whitespace
+            good_addrs = os.environ['FCGI_WEB_SERVER_ADDRS'].split(',')
+            good_addrs = [addr.strip() for addr in good_addrs] # Remove whitespace
         else:
             good_addrs = None
 
         # Check if the connection is from a legal address
-        if good_addrs != None and addr not in good_addrs:
+        if good_addrs is not None and addr not in good_addrs:
             raise RuntimeError("Connection from invalid server!")
 
 class THFCGI(FCGIbase):