Στις 4/7/2013 6:10 μμ, ο/η MRAB έγραψε:
What do you mean "I don't know how to catch the exception with OSError"? You've tried "except socket.gaierror" and "except socket.herror", well just write "except OSError" instead!
try: host = socket.gethostbyaddr( os.environ['REMOTE_ADDR'] )[0] except OSError: host = "UnResolved" produces also an internal server error. Are you sure is just except OSError ? seems very general... -- What is now proved was at first only imagined! -- http://mail.python.org/mailman/listinfo/python-list