Skip to content

Commit f6f8191

Browse files
committed
Merge pull request #8 from gjbroom/patch-1
ModbusSparseDataBlock handled dictionaries incorrectly (they have an __i...
2 parents 271fa15 + c178c66 commit f6f8191

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pymodbus/datastore/store.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ def __init__(self, values):
199199
'''
200200
if isinstance(values, dict):
201201
self.values = values
202-
if hasattr(values, '__iter__'):
202+
elif hasattr(values, '__iter__'):
203203
self.values = dict(enumerate(values))
204204
else: raise ParameterException(
205205
"Values for datastore must be a list or dictionary")

0 commit comments

Comments
 (0)