Skip to content

Commit

Permalink
Fixed reading a list of a single item
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre KOEBELIN koebpi1 committed Jun 13, 2019
1 parent 4e12337 commit 1b8fdf4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
13/06/19
-Fixed reading a list of a single item

05/31/19
-Fixed connection parameters that cause Micro8xx to fail forwrad open

Expand Down
2 changes: 1 addition & 1 deletion pylogix/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .lgxDevice import LGXDevice
from .eip import PLC
__version_info__ = (0, 3, 4)
__version_info__ = (0, 3, 5)
__version__ = '.'.join(str(x) for x in __version_info__)
2 changes: 2 additions & 0 deletions pylogix/eip.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ def Read(self, tag, count=1, datatype=None):
the arguments, read a single tag, or read an array
'''
if isinstance(tag, list):
if len(tag) == 1:
return [ _readTag(self, tag[0], count, datatype) ]
if datatype:
raise TypeError('Datatype should be set to None when reading lists')
return _multiRead(self, tag)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="pylogix",
version="0.3.4",
version="0.3.5",
author="Dustin Roeder",
author_email="[email protected]",
description="Read/Write Rockwell Automation Logix based PLC's",
Expand Down

0 comments on commit 1b8fdf4

Please sign in to comment.