Bandaid fix for exception error handling in python 3
Bandaid fix for exception error handling in python 3

Exception handling has changed a bit in python 3. when using exception as E, it no longer has the attribute e.message. now the message string is fully in e.

This is a bandaid fix that I did when editing the file during error checking. It may not be the correct way to do it.

I saw this when I was forcibly disconnecting the script after a c.open was called. Here is the log bit that called out this section and caused my script to not auto reconnect.


     File "C:\Python36\lib\site-packages\pycomm\cip\cip_base.py", line 867, in close
    error_string += "Error on close() -> session Err: %s" % e.message
AttributeError: 'CommError' object has no attribute 'message'
ottowayi/pycomm3