> [root@bart /]# ./dataman.py >Enter a domain name: aslfhafja >Your domain is aslfhafja >Traceback (most recent call last): > File "./dataman.py", line 7, in <module> > print socket.gethostbyname(str) >socket.gaierror: [Errno -2] Name or service not known >[root@bart /]#
>I would like to be able to handle that error a bit better. Any ideas? Go with the "try ... except ..." https://docs.python.org/3/tutorial/errors.html This email is confidential and may be subject to privilege. If you are not the intended recipient, please do not copy or disclose its content but contact the sender immediately upon receipt. -- https://mail.python.org/mailman/listinfo/python-list