ottowayi / pycomm3

A Python Ethernet/IP library for communicating with Allen-Bradley PLCs.
MIT License
406 stars 88 forks source link

changed documentation to match returned dict #209

Closed Colt-H closed 2 years ago

Colt-H commented 2 years ago

I think I may have found a mismatch between the documentation and the .info() method. I've tested the method on multiple PLCs of a few different versions, all with the same issue.

The following code:

with LogixDriver("10.10.10.10") as plc: print(plc.info["device_type"])

gives a KeyError.

Printing the entire dict shows all the keys listed in the docs except "device_type", however "product_name" shows up with the same info.

I think the only place this needed to be updated was in the docstring for the info method in logix_driver.py.

If there's something I'm missing, let me know. I went ahead and submitted a PR in case this was all that needed to be updated.

ottowayi commented 2 years ago

Thanks for finding that!