host = socket.gethostbyaddr( os.environ['REMOTE_ADDR'] )[0]

Why this line that worked in v2.6 give sme an error in v3.2.3

Traceback (most recent call last):
  File "files.py", line 14, in <module>
    host = socket.gethostbyaddr( os.environ['REMOTE_ADDR'] )[0]
  File "/opt/python3/lib/python3.2/os.py", line 450, in __getitem__
    value = self._data[self.encodekey(key)]
KeyError: b'REMOTE_ADDR'

-->
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to