except socket.error, (errno, msg):
if errno == 1:
# Operation not permitted
msg = msg + (
" - Note that ICMP messages can only be sent from processes"
" running as root."
)
raise socket.error(msg)
Traceback (most recent call last):
File "", line 1, in File "/usr/lib/python3/dist-packages/spyderlib/widgets/externalshell/sitecustomize.py", line 699, in runfile execfile(filename, namespace) File "/usr/lib/python3/dist-packages/spyderlib/widgets/externalshell/sitecustomize.py", line 88, in execfile exec(compile(open(filename, 'rb').read(), filename, 'exec'), namespace) File "/home/epamos/Downloads/Gping2(1).py", line 78 except socket.error, (errno, msg): ^ SyntaxError: invalid syntax
Estou usando o python 3.5, ao retirar a vírgula há o desencadeamento de 7 erros envolvendo GPing.
except socket.error as err:
depois deves ajustar. Estou no tele e não consigo testar mas pode ser que resolva