On Thu, 26 Sep 2013 12:56:19 +0300, Νίκος wrote:

> host = socket.gethostbyaddr( os.environ.get('HTTP_CF_CONNECTING_IP') or
> os.environ.get('REMOTE_ADDR') or  "Άγνωστη Προέλευση" )

Perhaps you need something that looks more like:

some_value = some_function_of( some_value ) or some_function_of
( some_value )
if some_value:
    host = some_function_of( some_value )
else:
    host = some_value

or even:

try:
    host = some_function_of( some_function_of( some_value ) or 
some_function_of( some_value ) )
except some_error_type [ or some_error_type .... ]:
    host = some_value

-- 
Denis McMahon, denismfmcma...@gmail.com
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to