I found the problem,

On maya 2014 the warning is considered a "real warning" except special case 
or it is a "warning error".
On maya 2018 the warning that I print to be considered as an error and 
therefore my try / except captures the error and sends it back to me ...

In fact the error of the socket module 10061 is normal ...

So my code with error is:
try:
    sock.connect((s_host, i_port))
    b_connected = True
except Exception, e:
    cmds.warning(e)
    b_connected = False

And solution is:
try:
    sock.connect((s_host, i_port))
    b_connected = True
except Exception, e:
    qd_logger.debug(e) # Python logging module
    b_connected = False


-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/758b68aa-7d19-436a-9073-fecfcb7f3aaf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to